Brrrian
11-10-2003, 12:01 AM
I'm chasing a window.close() issue. The Main page opens a child window which populates with a menu. Choosing a menu item opens the menu selection in the parent window. This is working well with these two scripts:
function popUp(page, name, details) {
newWin=window.open(page, name, details);
newWin.focus();
return false;
}
function loadinparent(url){
self.opener.location = url;
}
The user can continue to make choices from the Menu... each time populating the Parent Window until the user is done working. At that point they Click LogOut in the Main Window.
----------------
The Problem
-----------------
When the user Clicks LogOut in the Parent window after working awhile I need to Close the Child Window. I can't get anything to work.
onclick="theChildWindowName.close();"
onclick="child.close();"
onclick="newWin.close();"
The Parent seems to loose track of the Child window. I get errors like theChildWindow is undefined... or newWin is undefined.
I spent the weekend surfing javascript forums etc... no luck yet! Help! ;)
function popUp(page, name, details) {
newWin=window.open(page, name, details);
newWin.focus();
return false;
}
function loadinparent(url){
self.opener.location = url;
}
The user can continue to make choices from the Menu... each time populating the Parent Window until the user is done working. At that point they Click LogOut in the Main Window.
----------------
The Problem
-----------------
When the user Clicks LogOut in the Parent window after working awhile I need to Close the Child Window. I can't get anything to work.
onclick="theChildWindowName.close();"
onclick="child.close();"
onclick="newWin.close();"
The Parent seems to loose track of the Child window. I get errors like theChildWindow is undefined... or newWin is undefined.
I spent the weekend surfing javascript forums etc... no luck yet! Help! ;)