summaryrefslogtreecommitdiff
path: root/skins/common/ajax.js
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2007-09-14 13:18:58 +0200
committerPierre Schmitz <pierre@archlinux.de>2007-09-14 13:18:58 +0200
commit8f416baead93a48e5799e44b8bd2e2c4859f4e04 (patch)
treecd47ac55eb80a39e3225e8b4f3161b88ea16c2cf /skins/common/ajax.js
parentd7d08bd1a17618c7d77a6b9b2989e9f7293d6ed6 (diff)
auf Version 1.11 aktualisiert; Login-Bug behoben
Diffstat (limited to 'skins/common/ajax.js')
-rw-r--r--skins/common/ajax.js21
1 files changed, 14 insertions, 7 deletions
diff --git a/skins/common/ajax.js b/skins/common/ajax.js
index d90bea09..854d7a00 100644
--- a/skins/common/ajax.js
+++ b/skins/common/ajax.js
@@ -39,16 +39,21 @@ function sajax_init_object() {
sajax_debug("sajax_init_object() called..")
var A;
try {
- A=new ActiveXObject("Msxml2.XMLHTTP");
+ // Try the new style before ActiveX so we don't
+ // unnecessarily trigger warnings in IE 7 when
+ // set to prompt about ActiveX usage
+ A = new XMLHttpRequest();
} catch (e) {
try {
- A=new ActiveXObject("Microsoft.XMLHTTP");
- } catch (oc) {
- A=null;
+ A=new ActiveXObject("Msxml2.XMLHTTP");
+ } catch (e) {
+ try {
+ A=new ActiveXObject("Microsoft.XMLHTTP");
+ } catch (oc) {
+ A=null;
+ }
}
}
- if(!A && typeof XMLHttpRequest != "undefined")
- A = new XMLHttpRequest();
if (!A)
sajax_debug("Could not create connection object.");
@@ -75,7 +80,9 @@ function sajax_do_call(func_name, args, target) {
var i, x, n;
var uri;
var post_data;
- uri = wgServer + wgScriptPath + "/index.php?action=ajax";
+ uri = wgServer +
+ ((wgScript == null) ? (wgScriptPath + "/index.php") : wgScript) +
+ "?action=ajax";
if (sajax_request_type == "GET") {
if (uri.indexOf("?") == -1)
uri = uri + "?rs=" + encodeURIComponent(func_name);