I have a JavaScript function that makes two consecutive Ajax requests using jQuery. I want to make sure that the first request has loaded before the second function is call
For best results you should probably invoke the second function in the callback of the first.
For Example:
$.post("http://www.somewebsite.com/page.php", function(data) { // whatever function2(); });