@Phil_KarrasJul 06.2004 — #Something like this might do the trick: <i> </i><head> <script language="JavaScript" type="text/javascript"> <!--
var win1 = window.open(...); // This opens the popup to check for.
Where win1 is the var that holds the pointer to the pop-up window, as in: var win1 = window.open(...); Just make sure that win1 is a global var or this won't work.
Actually there's no such method as "closed" see below for my try-catch method in the parent window that will work.
// ################################################ // ##### Test functions go here ##### // ################################################
var win1 = 0; var tmp = 0; var ID = 0;
// ----------------------------------------------------- // Clears the recursive timeout and opens a new page in // this window. // // inputs: get the global ID value & clears the timer // outputs: none // actions: changes the URL of this page // returns: none // ----------------------------------------------------- function GotIt() { clearTimeout(ID); document.location.href = "index.htm"; }
// ----------------------------------------------------- // Continually checks for an open pop-up // // inputs: none // outputs: none // actions: catches the error when the popup is closed // and gives control to GotIt() function. // returns: none // ----------------------------------------------------- function CheckIt() { ID = setTimeout("CheckIt();", 500); // check ever 1/2 second