I have several AJAX functions and what I want is to have a function that controls that when one is finished, execute another one. This is the scheme.
function ajax1(){}
function ajax2(){}
function ajax3(){}
//solo cuando termine ajax1 ejecutar ajax2 y así sucesivamente
function controladora1(){
ajax1();
ajax2();
ajax3();
}
function controladora2(){
ajax3();
ajax2();
ajax1();
}
I know it has to be done with callbacks but I have not finished clarifying.