the browser is a standard windows app. a window will not appear until the
main thread (also the one client script is running in) calls the window loop
(doevents).
the workaround is simple, break you code into 2 parts and use
window.setTimeout (which uses a standard windows event) to run the second
part after a windows loop has been run.
p=window.createPopup();
var pbody=p.document.body;
pbody.style.backgroundColor="white";
pbody.style.border="solid black 2px";
pbody.innerHTML="All containers on same File/DO will be automatically
selected.
Please wait for this window to close.";
p.show(150,150,200,90,document.body);
window.setTimeout('doWork()',1);
}
function doWork()
{
while (i<len)
{
...this while loop takes about 7 seconds to complete...
}
}
-- bruce (sqlwork.com)
"John Walker" <Jo********@discussions.microsoft.com> wrote in message
news:4C**********************************@microsof t.com...
Hi,
I am using a popup window in my application and the problem I'm having is
that even though I tell it to display before a while loop, it only
displays
after the while loop completes. Please take a look at the code below. Is
there a way to get it to pop up before the while loop starts?
p=window.createPopup();
var pbody=p.document.body;
pbody.style.backgroundColor="white";
pbody.style.border="solid black 2px";
pbody.innerHTML="All containers on same File/DO will be automatically
selected. Please wait for this window to close.";
p.show(150,150,200,90,document.body);
while (i<len)
{
...this while loop takes about 7 seconds to complete...
}
Thanks,
John