我们有一段代码将多个文件上传到服务器,有趣的是,这段代码在 Chrome 和 Mozilla 上运行良好,但在 Internet Explorer 中失败,收到以下错误
XMLHttpRequest:网络错误 0x2ee2,由于错误 00002ee2 无法完成操作
我们尝试了SCRIPT7002 中提到的解决方案:XMLHttpRequest:网络错误 0x2ef3,由于错误 00002ef3 无法完成操作,但仍然遇到类似问题
我们使用以下 本指南更改了 Internet Explorer 的超时值,但它没有用。
我们找出导致问题的代码行
///////////////////////////////////////////////////////////////////////
// Private Helper for making servlet calls
_servercall: function(urlStr, input, isAsync, dataT, ajaxcallback) {
// Using the core $.ajax method
$.ajax({
// the URL for the request
url : urlStr,
async : isAsync,
// the data to send (will be converted to a query string)
data : input,
// whether this is a POST or GET request
type : "GET",
// the type of data we expect back
dataType : dataT,
// code to run if the request succeeds;
// the response is passed to the function
success : function(json) {
console.log("Server call - Success");
ajaxcallback(json);
},
// code to run if the request fails; the raw request and
// status codes are passed to the function
// This needs to be better handled, more graceful error, ToDo
error : function(xhr, status) {
console.log("Server call - error. Status " + status);
JCAAlert("com.ptc.windchill.enterprise.attachments.attachmentsResource.DO_APPLET_UPLOAD_ERROR");
this.cleanupUploadFields(this.wizardStep, null);
},
// code to run regardless of success or failure
complete : function(xhr, status) {
console.log("The request is complete! Status " + status);
}
});
},
此代码在 IE 上的文件号 12 之前工作正常,但是一旦我们选择超过 12 个文件,它就会失败并出现上述错误?
这是ajax限制还是什么?