xmlDoc.async="false";
That's not doing what you think. async
is a boolean property. When you assign the string "false"
to it, you're getting the value true
, because all non-empty strings are truthy.
It is possible to use the xmlDoc.load("note_error.xml"); for the object of XMLHttpRequest in other browsers.
Yes, in fact that's what you should be doing in IE too. There is no reason to use XMLDOM
to fetch an XML Document; XMLHttpRequest can do that fine and it's much more widely supported.
var xhr= window.XMLHttpRequest? new XMLHttpRequest() : new ActiveXObject('MSXML2.XMLHttp');
xhr.async= false;
xhr.open('GET', 'note_error.xml');
xhr.send();
var doc= xhr.responseXML;
If you do need an XMLDOM
-like object in other browsers, it's called new DOMParser
, but it's not as widely-supported as XMLHttpRequest
.