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).
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:
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){
3 matches
Mail list logo