I have two functions which has ajax calls inside them.
function a(){
ajaxCall_A();
}
function b(){
ajaxCall_B();
}
And I
Allow a function to accept a callback param to be executed when done, and send b function as a callback:
function c(){
a(b);
}
function a(callback){
$.ajax({
url: "url_a",
type: "post",
dataType: "html",
cache: false,
success: function(data){
callback() // Note here call the next function
},
error:function(){
}
});
}