[jQuery] Re: Getting XML info problem

2009-08-25 Thread Peter Edwards
Your code suffers from asynchronousitis. You call the ajax request, but alert the total before the response can alter the variable. Try doing it in the success callback as the previous poster suggested and you will get the correct value: var total = 0; function readXML(section) { $.ajax(

[jQuery] Re: Getting XML info problem

2009-08-25 Thread Dhruva Sagar
In your code, did you try and do an alert(xml) inside the success handler function (xml) to see if its getting the right content? Thanks & Regards, Dhruva Sagar. Pablo Picasso - "Computers are useless. They can only give you answers.

[jQuery] Re: Getting XML info problem

2009-08-25 Thread Liam Potter
This is the official forum, and ever heard of JSBin.com? ximo wallas wrote: I find it really sad that jquery doesn't have a oficial forum out there... My question is posted in this one, I can't post it here cause the HTML inside will blow the e-mail: http://www.jqueryhelp.com/viewtopic.php?t=