当我们移至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*/
});
});
});
我发现当名称后面缺少等号时,apache无法处理url参数。
因此,网址如下:
http://domain.com?x=22&y
是Apache无法理解的。
我猜dhtmlx小组不使用apache。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句