[jQuery] Trying to get a handle on xml returned object
Hi,
I've been trying to getsome XML data out of a jQuery AJAX request and
I'm having trouble. Problem is, I can't read the returned XML to see
what is being sent.
CODE:
$.ajax({
type: "POST",
url: "/cgi-bin/monitor.cgi",
data: dat,
dataType: "xml",
success: function(xml){
var str="";
for(var g in xml){
str+=g+':'+xml[g]+'\\n';
}
alert(str);
$("/progress",xml).each(function(){
var _duration=$("duration",this).text();
var _mark=$("mark",this).text();
alert("qf{'queue_name'}_monitor"+_duration+":"+_mark);
//$("#"+queuename+"_monitor").html(_duration+":"+_mark);
});
},
error: function(err,ex,x){
//alert("Error in monitor script!");
clearInterval(queuename+"_progressInterval");
}
});
The alert(str) part of the code (trying to get a list of properties of
the returned object) gives me a runtime error on firefox and fails
with "Object doesn't support this action"on IE7. Forefox reports the
returned objects as an "XMLDocument" object but I can't seem to access
any properties of it. Any ideas? Can someone point me at a way to get
the text of the returned objkect maybe so I can test it?