RadarBob
11-18-2002, 08:50 PM
The key to the problem I think is properly destroying the window variable/object I create...
This first function works the first time I open the child window. Subsequent attempts fail at the line highlighted. Seems the child window was not properly disposed of when closed. Also, if I remove focus, but do not close the child window, the function works - i.e. it puts focus on the open (but heretofore covered up) window.
function openReportsWindow() {
// just focus() if already open.
if ( typeof DBReportsWindow != "undefined") {
if (DBReportsWindow.open) {
DBReportsWindow.focus();
}else{
DBReportsWindow = window.open("Reports_Entry_Page.asp","AddReports");
}
}
} // end openReportsWindow()
This code, on the popup/child window is called when clicking "finished" on the child window.
. . .
window.close();
My inclination is to set DBReportsWindow = null; but I've either not put it in the right place, or it just won't do the trick.
This first function works the first time I open the child window. Subsequent attempts fail at the line highlighted. Seems the child window was not properly disposed of when closed. Also, if I remove focus, but do not close the child window, the function works - i.e. it puts focus on the open (but heretofore covered up) window.
function openReportsWindow() {
// just focus() if already open.
if ( typeof DBReportsWindow != "undefined") {
if (DBReportsWindow.open) {
DBReportsWindow.focus();
}else{
DBReportsWindow = window.open("Reports_Entry_Page.asp","AddReports");
}
}
} // end openReportsWindow()
This code, on the popup/child window is called when clicking "finished" on the child window.
. . .
window.close();
My inclination is to set DBReportsWindow = null; but I've either not put it in the right place, or it just won't do the trick.