Controlling popup window
I'm trying to control a popup window from two different pages in my main window but having troubles.
My first page (bigpage1.asp) opens a popup window called 'PopCreate'. This popup window opens a frameset with two frames; 'TopFrame' and 'BottomFrame'. While 'BottomFrame' is processing some information, the top frame's page (top1.asp) refreshes to page 2 (top2.asp) after 3 seconds (using meta refresh). On page 2 (top2.asp), I want the entire popup window to close. I'm having troubles with this.
Alternatively, when the first page (bigpage1.asp) in my main window refreshes to the main second page (bigpage2.asp), the second page (bigpage2.asp) could close the popup window (PopCreate).
Any ideas how I might do this? If you still don't understand, please shout!!
Here's a demo I just cooked up for you...
I'll leave you to work out how to tweak it for your needs (otherwise it's no fun!) ;)
var myWindow = null;
myWindow = window.open('popup.htm');
<input type="button" value="test" onclick="openpopup()" />
Any questions? :D
<body onload="alert('click ok to close window'); window.opener.closepopup();">
(Alternatively, if an IE-only solution is ok, then simply use a modal dialog which closes itself when processing is complete...!)
So was that of any use then?