Do you want to execute synchronous queries? If so, you need to use the jQuery method ajaxinstead of getsetting async:false.
check out http://api.jquery.com/jQuery.ajax/
EDIT
As soon as one commenter correctly pointed out, the execution of synchronization requests freezes, only one javascript code of the stream. This means that the animation or other code does not work while you wait for the requests to finish.
An interesting option would be to “chain” your queries, execute the following query in a previous callback as follows:
$.get('ajax/first-call.html', function(data) {
$.get('ajax/second-call.html', function(data){
}
});
source
share