Is it possible to set async:false to $.getJSON call.... Any suggestion....
A:
I don't think you can set that option there. You will have to use jQuery.ajax() with the appropriate parameters (basically getJSON just wraps that call into an easier API, as well).
Daff
2010-05-04 13:03:15
A:
You need to make the call using $.ajax()
to it synchronously, like this:
$.ajax({
url: myUrl,
dataType: 'json',
async: false,
data: myData,
success: function(data) {
//stuff
}
});
This would match currently using $.getJSON()
like this:
$.getJSON(muUrl, myData, function(data) {
//stuff
});
Nick Craver
2010-05-04 13:51:03