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 called. Is there a way I can do this?
I have a JavaScript function that makes two consecutive Ajax requests using jQuery. I
Share
Either specify
async: falsein the$.ajaxoptions, or make the second ajax call in thecompletecallback of the first call.