为什么xml传递的长度超过2000个字符就不能传递到后台?急。。。。。。

liqing7165 2007-03-08 02:48:13
代码如下,如果message大于2000个字节就报错,不知道为什么?
var loc = (loc==null)?"":loc+"/";
var xmlHttp = null;
if (window.XMLHttpRequest){
xmlHttp = new XMLHttpRequest();
}else {
if (window.ActiveXObject){
// ...otherwise, use the ActiveX control for IE5.x and IE6
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
}
//message = encodeURIComponent(message);

xmlHttp.open("POST",
loc + "eMisproIW.dll?operator="+action+
"&message="+message+
"&moduleID="+getCurrentModuleId()+
"&returnType=XML", false);
xmlHttp.setRequestHeader("Content-Type","text/xml");
xmlHttp.setRequestHeader("Content-Type","gb2312");
window.top.defaultStatus = '数据交互中,请稍候';

if(xmlHttp.send()==false){
alert("数据传输失败!");
window.top.defaultStatus = '数据交互失败!';
return false;
}else{
if(isInvalidate(xmlHttp.responseText))
window.close();
window.top.defaultStatus = '数据交互完成!';
var result = xmlHttp.responseXML;
try{
if(result.childNodes[1].nodeName=='error'){
window.showAlert(result.childNodes[1].text);
result = null;
}
}catch(e){
}

xmlHttp = null;
return result;
}
...全文
229 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
孟子E章 2007-03-08
  • 打赏
  • 举报
回复
如果是windows 2003,检查是否是200k的限制,网上很多解决方法,修改Windows\System32\Inesrv目录下的Metabase.xml

8,906

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧