Home > DeveloperSection > Forums > How to call function synchronously
ravindra nalwaya
ravindra nalwaya

Total Post:4

Posted on    October-30-2014 12:10 AM

 Sencha Touch Sencha Touch 

 1 Reply(s)
 1435  View(s)
Rate this:
Hi Developers,
Can anyone help me to call function synchronously using sencha touch. Function should complete all the statement it contains.

Sumit Kesarwani

Total Post:378

Posted on    October-30-2014 2:00 AM

Hi Ravindra, 

Below is the sample code to call the function synchronously, just set false in async.

url: 'your page',
method: 'POST',
success: success,
failure: failure,
scope: this,
params: {foo: 'bar'},
async: false

// or directly ...
Ext.lib.Ajax.request('POST', url, callback, params, {async: false});

Don't want to miss updates? Please click the below button!

Follow MindStick