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
Either specify async: false in the $.ajax options, or make the second ajax call in the complete callback of the first call.
async: false
$.ajax
complete