英特尔XDK中的HTTP请求(HTTP requests in Intel XDK)
我之前在2月23日更新之前在英特尔XDK平台上构建了一个应用程序,现在软件已经更新,当我尝试运行模拟器它只是崩溃。
之前我通过以下方式向进程php页面发送了get请求以进行登录。
$(document).ready(function(){ $('form.login').submit(function () { var user = $(this).find("[name='user']").val(); var pass = $(this).find("[name='pass']").val(); var sublogin = $(this).find("[name='sublogin']").val(); // ... $.ajax({ type: "POST", url: "http://www.domain.com/data/apps/project1/process.php", data: { user : user, pass : pass, sublogin : sublogin, }, success: function(response){ if(response == "1") { $("#responsecontainer").html(response); window.location.href = "menu.html"; } // Login failed else { $("#responsecontainer").html(response); } //alert(response); } }); this.reset(); return false; }); });
但是,似乎这是导致问题的代码片段,如果我删除此项代码,项目不再崩溃。
当我阅读英特尔XDK文档时,它只显示调用XML文件的HTTP请求。
所以我希望有人可能知道为什么这会导致问题或我如何构建它以便英特尔XDK不会崩溃。
I previously built an app in the Intel XDK platform pre the Feb 23rd update and now the software has updated when i try to run the emulator it just crashes.
previously i sent a get request to a process php page for a login in the following way.
$(document).ready(function(){ $('form.login').submit(function () { var user = $(this).find("[name='user']").val(); var pass = $(this).find("[name='pass']").val(); var sublogin = $(this).find("[name='sublogin']").val(); // ... $.ajax({ type: "POST", url: "http://www.domain.com/data/apps/project1/process.php", data: { user : user, pass : pass, sublogin : sublogin, }, success: function(response){ if(response == "1") { $("#responsecontainer").html(response); window.location.href = "menu.html"; } // Login failed else { $("#responsecontainer").html(response); } //alert(response); } }); this.reset(); return false; }); });
However it seems that this is the piece of code that is causing the problems, if I remove this item of code the project no longer crashes.
When i read through the Intel XDK documents it only shows HTTP request to call XML files.
So i was hoping that somebody may know why this is causing the problem or how i might construct it so that Intel XDK doesn't crash.
原文:https://stackoverflow.com/questions/28702497
最满意答案
问题是一个覆盖,其内部有一个错误的ACL检查。
The Problem was an overlay which had a false ACL checking within.
相关问答
更多-
这样,Laravel只会按照您指定的凭据选择用户,如果您想检查用户拥有的状态以及要显示的视图,则可以覆盖登录控制器的authenticated()方法。 它可以访问已经登录的用户,所以请注意,你必须注销它的状态是无效的。 protected function authenticated(Request $request, $user) { if ( $user->status == 0 ) { auth()->logout(); return back()->wit ...
-
我通过将这个JS脚本放入html5smartimage来扩展html5smartimage xtype var MyAppLib = MyAppLib || {}; MyAppLib.NamedHtml5SmartImage = CQ.Ext.extend(CQ.html5.form.SmartImage, { constructor : function(config) { config = config || {}; var defaults = { ...
-
问题是一个覆盖,其内部有一个错误的ACL检查。 The Problem was an overlay which had a false ACL checking within.
-
在CQ5中为Sidekick和Insert对话框动态定义组件列表(Define component list dynamically for Sidekick and Insert dialog in CQ5)[2021-02-04]
好。 最后想出了这个问题。 我想清除传递给我的处理程序的现有组件列表,我使用allowed = []; 。 这删除了对允许的数组的所有现有引用。 (更多关于此解释)。 因此将其更改为allowed.length = 0; 工作得非常好。 function MyHandler(cell, allowed, componentList) { allowed.length = 0; allowed.push("/libs/foundation/components/list"); } Ok. F ... -
我不是其背后推理的权威,也许一个对决策有远见的人可以介入,但据我所知,var最初是任何临时或派生数据的位置,但不一定是客户面对。 版本控制和一堆其他信息存储在那里,因此不应该向客户端公开。 / etc是一般在调度程序上保持打开的位置,因此如果查找信息属于SDLC的一部分,则放置查找信息的逻辑位置在此位置内。 如果查找是可授权的,那么将它放在/ content目录中会更明智,如果你正在做任何涉及多租户的事情都适合重写策略。 此外,如果不同的租户正在访问相同的查找数据,即 http://www.mysite.c ...
-
CQ5登记表(Registration form in CQ5)[2023-06-28]
您可以在jsp中编写带有表单的自定义组件以及提交按钮include。 在表单内部使用一个parsys(用于添加字段组件,如textfield,下拉列表,隐藏字段。这些字段在sidekick中的通用表单块组中)。 然后编写一个servlet以从表单提交。 这种方式只有表单路径和提交按钮将固定其余的字段作者可以随时随地任意数字。 You can write a custom component with form inside jsp along with submit button include. Insi ... -
当我们通过包移动内容时,我看到了类似的行为,最终创建了一个没有关联的jcr:content节点的页面。 这不必在您遇到问题的页面上,它可能是一个兄弟页面。 我会检查该网站下网页的完整性。 I've seen similar behaviour when we had content moved via a package and it ended up creating a page without an associated jcr:content node. This doesn't have to b ...
-
是肖恩 你是对的,当我设置对keySet()方法的期望时,它被调用。 this.allowing(paramsMap).keySet(); 但我的问题是,我们需要为每一种行为设定期望。 这是否有意义,我的意思是单元测试代码变得超过实际的java代码:)。 我们是否有任何替代解决方案,以便我们可以减少测试代码。 this.allowing(resource).adaptTo(Node.class); this.will(returnValue(node)); ...
-
您可以使用显示字段并在html属性中指定所需的输出,如下所示。 "warnMsg": { "html": "Warning", "xtype": "displayfiel ...
-
如果通过浏览器从DAM管理页面上传到5.4.0实例,我建议分析它所做的HTTP请求,以便从Flex客户端重现相同的请求。 5.4.0和5.5.0 HTTP API之间可能存在细微差别,这可以解释这一点。 If uploading from the DAM admin page via a browser works on the 5.4.0 instance, I would suggest analysing the HTTP request that this makes, to reproduce t ...