[common] ActiveXObject for XMLHttpRequest failed in IE11 for some requests
This commit is contained in:
parent
8499e4d47b
commit
0fc75a9ab5
|
@ -39,20 +39,22 @@ Common.Locale = new(function() {
|
||||||
|
|
||||||
var _createXMLHTTPObject = function() {
|
var _createXMLHTTPObject = function() {
|
||||||
var xmlhttp;
|
var xmlhttp;
|
||||||
try {
|
if (typeof XMLHttpRequest != 'undefined') {
|
||||||
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
xmlhttp = new XMLHttpRequest();
|
||||||
}
|
} else {
|
||||||
catch (e) {
|
|
||||||
try {
|
try {
|
||||||
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
||||||
}
|
}
|
||||||
catch (E) {
|
catch (e) {
|
||||||
xmlhttp = false;
|
try {
|
||||||
|
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
||||||
|
}
|
||||||
|
catch (E) {
|
||||||
|
xmlhttp = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
|
|
||||||
xmlhttp = new XMLHttpRequest();
|
|
||||||
}
|
|
||||||
return xmlhttp;
|
return xmlhttp;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -634,20 +634,22 @@ Common.Utils.applyCustomizationPlugins = function(plugins) {
|
||||||
|
|
||||||
var _createXMLHTTPObject = function() {
|
var _createXMLHTTPObject = function() {
|
||||||
var xmlhttp;
|
var xmlhttp;
|
||||||
try {
|
if (typeof XMLHttpRequest != 'undefined') {
|
||||||
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
try {
|
|
||||||
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
|
||||||
}
|
|
||||||
catch (E) {
|
|
||||||
xmlhttp = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
|
|
||||||
xmlhttp = new XMLHttpRequest();
|
xmlhttp = new XMLHttpRequest();
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
try {
|
||||||
|
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
||||||
|
}
|
||||||
|
catch (E) {
|
||||||
|
xmlhttp = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return xmlhttp;
|
return xmlhttp;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -690,17 +692,19 @@ Common.Utils.fillUserInfo = function(info, lang, defname) {
|
||||||
|
|
||||||
Common.Utils.createXhr = function () {
|
Common.Utils.createXhr = function () {
|
||||||
var xmlhttp;
|
var xmlhttp;
|
||||||
try {
|
|
||||||
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
if (typeof XMLHttpRequest != 'undefined') {
|
||||||
} catch (e) {
|
|
||||||
try {
|
|
||||||
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
|
||||||
} catch (E) {
|
|
||||||
xmlhttp = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
|
|
||||||
xmlhttp = new XMLHttpRequest();
|
xmlhttp = new XMLHttpRequest();
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
||||||
|
} catch (e) {
|
||||||
|
try {
|
||||||
|
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
||||||
|
} catch (E) {
|
||||||
|
xmlhttp = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return xmlhttp;
|
return xmlhttp;
|
||||||
|
|
Loading…
Reference in a new issue