Entry tags:
- google,
- msie,
- programming,
- swearing,
- xml
xml_request
, an XMLHttpRequest
object:
alert(xml_request.responseText); // This prints the correct thing.
var xml_doc = xml_request.responseXML;
var root_element = xml_doc.documentElement;
if (root_element) {
alert("I have a document element. I am a sane browser!");
}
else {
alert("I have no document element. I must be MSIE. Fuck.");
}
alert()
makes me sure that MSIE (as well as any other browser) is in fact reading the XML. I just can't do a damn thing with it after that; every attempt to peek into any DOMmish properties of xml_doc
returns null.xml_doc.firstChild
and equivalent statements all fail equally (while succeeding on sane browsers). Wha?
MWJ_ldD[MWJ_ldD.length-1].onreadystatechange = new Function( 'if( MWJ_ldD['+(MWJ_ldD.length-1)+'].readyState == 4 ) { '+oFunct+'(MWJ_ldD['+(MWJ_ldD.length-1)+'].load?MWJ_ldD['+(MWJ_ldD.length-1)+']:MWJ_ldD['+(MWJ_ldD.length-1)+'].responseXML); }' );