View Full Version : Parallel processing Ext code in ajax responses

22 Jul 2008, 2:50 AM
On my webapplication i have a grid. A click on the grid, does an ajax call (with Ext.updater) to fill a div somewhere on the page. The result of the ajax call is processed (scripts=true) and contains Ext code for forms, grid or whatever is necessary. In FF if i click between records in the grid really quickly, its not really a problem. Everything keeps working. If you quickly click through the items in IE, it will produce an unknonw JS error. It looks like it is working through the JS of response 1, and it needs to stop if i do a new response, but it seems to continue. Can this problem be solved?

(I've already tried to use the ajax queues and base extensions found on this forum, but these only provide queuing for the actual ajax call, not for the processing of the Ext JS contained herein)

22 Jul 2008, 3:02 AM
Try using tasKs and buffers.

22 Jul 2008, 3:54 AM
I've looked on the forum, documentation and in the API. Can you give me a direction to documenation on tasks and buffers?

22 Jul 2008, 4:31 AM

22 Jul 2008, 4:54 AM
I did found that one, but i do not see how it will solve my problem. I would create a task once a row in my left grid is selected and start that in the taskmanager. If i click again another row, it will be added, but the page will change anyway, and result in the same error since some elements might not be visible anymore.

22 Jul 2008, 5:22 AM
try buffering the gridpanel's cell/rowclick event

mygridpanel.on('rowclick', function(grid, rowIdx, e) {
// your code here
}, mygridpanel, { buffer: 250 }});