I'd like to put loop on hold until it resumed from frame.
I have a function that submit file update in unvisible frame:
-----------------------------------------------------------
var Used = false;
function sbmColumn(col)
{
for(var i=0; i < NumOfItm; i++)
{
var url = "EComItmSave.jsp?Cls=" + i;
waitUntillFreed();
window.frame1.location.href=url
Used = true;
}
}
function waitUntillFreed()
{
if(Used) setTimeout("waitUntillFreed()", 300);
}
function reuseFrame()
{
Used = false;
}
------------------------------------------------------
I want that waitUntillFreed() looping until Used is true
than continue to run FOR loop in sbmColumn().
The reuseFrame() will be started from frame1 on completion.
Is it possible to do?
I have a function that submit file update in unvisible frame:
-----------------------------------------------------------
var Used = false;
function sbmColumn(col)
{
for(var i=0; i < NumOfItm; i++)
{
var url = "EComItmSave.jsp?Cls=" + i;
waitUntillFreed();
window.frame1.location.href=url
Used = true;
}
}
function waitUntillFreed()
{
if(Used) setTimeout("waitUntillFreed()", 300);
}
function reuseFrame()
{
Used = false;
}
------------------------------------------------------
I want that waitUntillFreed() looping until Used is true
than continue to run FOR loop in sbmColumn().
The reuseFrame() will be started from frame1 on completion.
Is it possible to do?