【发布时间】:2015-01-28 22:53:56
【问题描述】:
这一切都是从我们迁移到 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*/
});
});
});
【问题讨论】:
标签: javascript apache http-headers dhtmlx http-status-code-400