[jQuery] Re: Simple Ajax question

2008-11-04 Thread Thomas
I found it! The problem was that I used the complete and I should success ! After this repair I easily access the response with $(xml).

[jQuery] Re: Simple AJAX Question

2008-10-20 Thread ricardobeat
Ajax calls don't reload the page. The easiest way is to use JSON: $('li').click(function(){ var _name = $(this).text(); $.getJSON(getdata.php,{ name: _name }, function(data) { alert('name is: '+ data.name) }); }); Then your server script must return a Javascript object: { name:

[jQuery] Re: simple ajax question

2008-01-15 Thread Diego A.
What you actually need is to do whatever someFunc does inside the success function. If it depends on the result of the ajax call, then forget someFunc and someVar. Why can't you just do it like this? $.ajax({ type: GET, url: requestURL, success: function(msg){