PDA

View Full Version : Execute a function when the current request finished



ccasasola
20 Jun 2014, 3:17 PM
I wish execute a javascript function after an asynchronous function finished

My code is similar to this:


function asynchronous(){
//call to asynchronous request
}

function toinvoke(){
//Validate if request of asynchronous finished
}

Thanks for help me

willigogs
21 Jun 2014, 12:00 AM
Ext.Ajax.request({
url: 'foo.php',
params: { foo: 'bar' }
success: someFn,
failure: otherFn
});