I am making an ajax call to the server. The code I need to run can be divided into 3 groups.
- Code that needs to run before the ajax call ins made (preparing the json object going to the server)
- Code that needs to be run after the ajax call has returned (uses what was sent back from the server)
- Code that needs to be run between the time the user presses a button and the time everything is done. This code does not need the returned json object.
It would be ideal to run the code in group 3 after making the ajax call and before the results are back to gain the best user experience and performance.
Can this be done?
How?





Rating:
The post jquery – how to run javascript while waiting for the ajax callback appeared first on Javascript ASK.
via Javascript ASK http://javascriptask.phpfogapp.com/jquery-how-to-run-javascript-while-waiting-for-the-ajax-callback.html
No comments:
Post a Comment