i´m calling a function that loads content via AJAX (ajax.load_mainmenu). When that´s done i want to do some other stuff. I can´t call it on “success” directly so i need to do it AFTER the request is finished. How can i do that?
ajax.load_mainmenu(data).function()
{
// Some other functions
}
if(ajax.load_mainmenu(data))
{
// Some other functions
}
Forgive me my stupid approaches. Still learning ;). I could pass a reference to another function to my AJAX-function (called on “success”), but it seems a bit to overcomplicated to me.
simple :
you should use the callBaCK FUNCTION .