Possible Duplicate:
jQuery .find() doesn't return data in IE but does in Firefox and Chrome
I get a xml with $.get then i do $(theXml).find('content').html() works fine in firefox and chrome but it gives javascript error in IE $(theXml).find('content').text() works fine
This is theXml i get <?xml version="1.0" encoding="UTF-8"?><response><status>1</status><result><content><div id="rr"><h1>fdasa</h1><img src="www.google.com"/></div></content></result></response>
And this error in IE
Error: 'this.0.innerHTML' is null or not an object.
edit:
This is happening in the callback of $.get request. The response is a XML where the <content> node contains the html markup. The response is first parsed using this function as intially it wasn't working in chrome and IE
function parseXml(xml)
{
if (jQuery.browser.msie)
{
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.loadXML(xml);
xml = xmlDoc;
}
return xml;
}
var theXml = parseXml(xml);
then we tried to get the html inside the content node using
$(theXml).find('content').html()
fdasa