28
rated 0 times
[
35]
[
7]
/ answers: 1 / hits: 16861
/ 13 Years ago, thu, march 31, 2011, 12:00:00
If I do an AJAX post with jQuery that looks like
$.post('MyApp/GetPostResult.json', function(data) {
// what goes here?
});
and the result looks like
{
HasCallback: true,
Callback: function(){ alert('I came from the server'); }
};
Then how do I call the Callback function? Can I just write if(data.HasCallback){data.Callback();}
?
More From » jquery