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?

Lelio Faieta
  • 6,457
  • 7
  • 40
  • 74

0 Answers0