Ajax.request.responseXML.getElementsByTagName("result")[0].firstChild.nodeValue work in FireFox but not in IE?
I use the following code to get the request object:
unction GetXmlHttpObject() {
var xmlHttp;
try {
if (window.XMLHttpRequest) {
xmlHttp=new XMLHttpRequest();
alert("XMLHttpRequest");
} else if (window.ActiveXObject) {
try {
// Internet Explorer
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
alert("Msxml2.XMLHTTP");
} catch (e) {
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
alert("Microsoft.XMLHTTP");
}
} else {
alert("No XMLHttp Object could be found");
}
} catch (e) {
alert("Could not create Ajax call: " + e);
}
return xmlHttp;
}
The example code I used works in both IE and FF... but my own attempt has been full of fail.
now if I check Ajax.request.responseXML then I get the XML in text form:
<?xml version="1.0" ?><result><![CDATA[Something something something]]></result>
Perhaps the CDATA tag is messing me up...

New Topic/Question
Reply



MultiQuote



|