[jQuery] Reading the HTML of a AJAX response
I'm having trouble getting the HTML of a AJAX response. The
response.html() keeps coming up as undefined. I figure .html() doesn't
work, as the response is not attached to the DOM, but I can't come up
with any workarounds.
Here's the resonse;
<response><valid>false</valid><errors>ERROR 1<br/>ERROR
2<br/></errors></response>
Here is the request;
$.post("/tests/validation", query, function(xml) {
if($("valid",xml).text() == 'false'){
// THIS WORKS..
$("#errors").html($(xml).html());
}
});
Any ideas?
Thanks,
~ Brice
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/