I've spent the past few hours fighting with exactly this type of problem. My problem is using $.post or a comparable $.ajax call. It seems like there's something wrong with the object getting passed to the callback. Any attempts at getting at the data seems to make things just hang, in that, the browser still responds and all, but my debug output statements stop appearing. I have a callback like:
function(data) { alert(data); // shows XMLSomethingOrOther $('success',data).text(); // or .children() or .size() alert('made it'); // this never happens } Even replacing the $(..) call with $(data).filter(...) hangs. What's really strange is even doing data.firstChild hangs. The returned xml is like: <success>foo</success> So I'm trying switching over to html instead of xml. Now my data looks like: <div class="success">foo</div> Now my data is getting returned properly, I can do $(...).size()/.childre()/.tex(), but $('.success', data).size() still equals 0. Argh. I'm I doing something majorly wrong, or is this stuff just not quite up to par? I'm using jq1.0.4 with ff2 on winxp with firebug 0.4.1. Firebug verifies that all of my data is getting sent and received properly, and that the mime types are all correct. --Erik On 12/19/06, insq <[EMAIL PROTECTED]> wrote:
Hello there, This may sound like a dumb question, but somehow I can't figure it out: Let's say we have a basic xml file and a simple piece of code: <?xml version="1.0"?> <foo> <title>This was loaded from an external XML file.</title> </foo> $.get("ajax-test.xml",function(xml){ alert( $("title",xml).text() ); }); This only works when put directly in $(document).ready(function() { }. I can't receive any response using events (click etc.) Firebug console notices a GET response as long as alert window (unfortunately empty) is visible. Thanks in advance. -- View this message in context: http://www.nabble.com/xml-response-with-%24.get%28%29-tf2848454.html#a7955113 Sent from the JQuery mailing list archive at Nabble.com. _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
_______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/