C
Charles Lavin
Hi --
I have a Web page. When a user clicks on a link on this page, I need a
pop-up window to open; that window will execute server-side code. When this
window is closed (and not before), I need the main page to reload.
I coded this for the link, which works:
<a onclick="w = window.open('whatever'); while (!(w.closed));
location.reload(); return false;" href="whatever">CLICK HERE</a>
The user clicks on the link on the main page, does what he needs to do on
the pop-up window, closes that pop-up window, and the main page
automatically reloads.
However, I have noticed that when that pop-up window opens, the process
associated with the main window chews up all of the available CPU. I suspect
it's that while statement spinning in place with nothing to do.
Is there a cleaner way to do what I need to do, or at least one that won't
chew up the CPU?
Is there a way for that pop-up window to force a reload of the main page
before it closes?
Thanks,
CL
I have a Web page. When a user clicks on a link on this page, I need a
pop-up window to open; that window will execute server-side code. When this
window is closed (and not before), I need the main page to reload.
I coded this for the link, which works:
<a onclick="w = window.open('whatever'); while (!(w.closed));
location.reload(); return false;" href="whatever">CLICK HERE</a>
The user clicks on the link on the main page, does what he needs to do on
the pop-up window, closes that pop-up window, and the main page
automatically reloads.
However, I have noticed that when that pop-up window opens, the process
associated with the main window chews up all of the available CPU. I suspect
it's that while statement spinning in place with nothing to do.
Is there a cleaner way to do what I need to do, or at least one that won't
chew up the CPU?
Is there a way for that pop-up window to force a reload of the main page
before it closes?
Thanks,
CL