Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 138192

about asincromicity of ajax call [duplicate]

$
0
0

I bind some javascript code on form submit like this:

$('#weather').submit(function(e){
    e.preventDefault(e);
    //some javascript here
    $.ajax(){//ajax call number 1};
    $.ajax(){//ajax call number 2};
});

I want to be sure that the first ajax call is completed before starting the second one. Do I have to move the second call as a callback of the first one to get it?


Viewing all articles
Browse latest Browse all 138192

Trending Articles