I need to call the constGrid(arg1)
function 3 times to set up an extjs grid when my form loads. There are other fields on my page as well. I want to ensure that the page does not hang or wait for the method to complete.
onLoad(function() {
for (var i=0; i<arg.length;i++) {
constGrid(arg[i]);
}
....
})
However, using setTimeout like below causes the webpage, especially in IE, to hang until completion.
onLoad(function() {
for (var i=0; i <argArr.length;i++) {
(function(i) {
setTimeout(constGrid(argArr[i]));
})(i));
}
....
})
Your assistance in making this process asynchronous would be greatly appreciated. Thank you.