xhr transport added
[brisk.git] / web / commons.js
index 9f70f65..75cabf4 100644 (file)
@@ -235,8 +235,10 @@ function safestatus(a)
 }
 
 function createXMLHttpRequest() {
-    try { return new ActiveXObject("Msxml2.XMLHTTP");    } catch(e) {}
-    try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {}
+    if (typeof(ActiveXObject) != 'undefined') { // Konqueror complain as unknown object
+        try { return new ActiveXObject("Msxml2.XMLHTTP");    } catch(e) {}
+        try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {}
+    }
     try { return new XMLHttpRequest();                   } catch(e) {}
     alert("XMLHttpRequest not supported");
     return null;