ExtJS : Ajax asynchronous vs synchronous request

Ajax is used for get data to client side. It’s special helpful in case get data at runtime.

The structure:

    url: '/controller/GetData',
    params: {
        id: 1
    timeout: 30000,
    method: GET or POST,
    async: isAsync // Synchronous or Asynchronous
    success: function(response){
        var text = response.responseText;
        var result = Ext.JSON.decode(text);
        // do something here .....
    failure : function(response){
       // do something when wrong ....

Published by Nguyen Quoc Dung

"If you only do what you can do You never be more than you are now"

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: