[jQuery] problem with ajax
Hey everyone,
I'm trying to use the jQuery.ajax function, to fetch a webpage on
which I would like to run some jQuery on that page.
The problem that I am running into is that dataType field. I am
setting it to xml, but ajax keeps returning text. Here is the code:
XML_page = jQuery.ajax({ //get the whole page via ajax
url: "",
data: 'q='+mucie_get_q(),
async: false,
dataType: "xml",
});
XML_page.responseXML will be equal to null, but .responseText will
contain the document.
I've also tried converting responseText to something useful, using
jQuery(responseText), but that hasn't worked for me either. When I
try to find/select by id, i get "this.getElementsByTagName is not a
function"
Any advice for the problems that I am running into, either getting
ajax to return a DOM, or converting the string to a DOM?
Thanks,
Dan