这一切都是在我们搬到DHTMLX v4.0.3时开始的。 dhtmlxForm.send()函数现在抛出HTTP状态400 - " 客户端发送的请求在语法上是不正确的。"我没有看到POST有什么问题。我注意到他们现在包括一个随机生成的项目" dhxr1422484613542"那没有价值。知道为什么现在抛出HTTP 400了吗?谢谢!
标题标签: 预览标签: JavaScript:
dhtmlxEvent(window,"load",function(){
var dhxLayout = new dhtmlXLayoutObject(document.body, '1C');
var f = dhxLayout.cells("a").attachForm([
{type:"settings", position:"label-left", labelAlign:"right", labelWidth:150, inputWidth:150},
{type:"hidden", name:"method", value:"getJson"},
{type:"hidden", name:"proc", value:"c3.chgpwd"},
{type:"password", name:"oldpwd", label:"Current Password", required:true},
{type:"password", id:"newpwd", name:"newpwd", label:"New Password", required:true},
{type:"password", name:"confirmpwd", label:"New Password (Again)", required:true},
{type:"button", name:"submit", width:50, offsetLeft:150, value:"Submit"}
]);
f.attachEvent("onButtonClick", function(name){
/* Here is the POST that used to work, but since v4.0.3 it throws a HTTP 400 */
f.send("lib.cfc?method=getJson&proc=c3.chgpwd","post",function(loader, response){
console.log(response); /*This is never reached, see attachments for the error reported during the POST*/
});
});
});
答案 0 :(得分:0)
我发现当名字后面缺少等号时,apache无法处理url参数。
这样的网址如:
http://domain.com?x=22&y
apache无法理解。
我猜dhtmlx团队不使用apache。