PDA

View Full Version : asynchronous server call handeling



santoshsatav
5 Aug 2010, 1:59 AM
hi

i have 2 grids on page one is loaded and other get loaded when row from first grid checked so this done with asynchronous ajax call to server, server taking some time to response so if user clicks other row mean while it give wrong data , i want to abort first responce if user selects other another row,
so my question how to handle asynchronous ajax call effectively in extjs ? :-/

thank you

Condor
5 Aug 2010, 2:52 AM
Use:

proxy: new Ext.data.HttpProxy(new Ext.data.Connection({
url: '...',
autoAbort: true
}))
(this will abort the previous request if you start a new one)

santoshsatav
5 Aug 2010, 4:01 AM
Use:

proxy: new Ext.data.HttpProxy(new Ext.data.Connection({
url: '...',
autoAbort: true
}))(this will abort the previous request if you start a new one)
i my code i am creating json file through code and response binded to second grid there is no as such connection string

Condor
5 Aug 2010, 5:38 AM
i my code i am creating json file through code and response binded to second grid there is no as such connection string

You said your were loading the data for the second store. How are you doing that if you are not using a HttpProxy?