HOW TO CALL FUNCTION SYNCHRONOUSLY

ravindra nalwaya

Total Post:4

Points:28
Posted by  ravindra nalwaya
 1458  View(s)
Ratings:
Rate this:
Hi Developers,
Can anyone help me to call function synchronously using sencha touch. Function should complete all the statement it contains.
  1. Sumit Kesarwani

    Post:378

    Points:2694
    Re: How to call function synchronously

    Hi Ravindra, 


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


    Ext.Ajax.request({
    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});

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!