* (bug 10397) Fix AJAX watch error fallback when we receive a bogus result
* (bug 10396) Fix AJAX error when $wgScriptPath/index.php is not valid;
using $wgScript now included in JS info
+* Use native XMLHttpRequest class in preference to ActiveX on IE 7; this
+ avoids the "ActiveX "Do you want to allow ActiveX?" prompt when something
+ security settings are cranked this way and AJAX-y gets used.
== API changes since 1.10 ==
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.");