cmetz1977
07-04-2009, 06:32 AM
I am currently using window.open to launch a child window to do some sub-processes with the user. When the user finishes, I would like the child window to redirect the parent page and close itself.
I know how to do all this, but the whole thing becomes unhinged as the user browses in the child window.
Step 1
(from main window)
var childwindow = window.open( ... );
childwindow.parentwindow = self;
From this code, a child window: childwindow, is opened and it understands the variable 'parentwindow' to be the window from which it was launched.
Step 2
(The user browses through a few pages in childwindow to complete the sub-process. However, as the initial page unloads, the var parentwindow is lost.)
Step 3
(from remote window)
parentwindow.window.location = 'childwindowresult.html?childwindowresults=' + childwindowresults;
window.close( );
Is there a way to maintain the variable 'parentwindow' as the user navigates through 'childwindow'? Am I using the wrong approach altogether?
I know how to do all this, but the whole thing becomes unhinged as the user browses in the child window.
Step 1
(from main window)
var childwindow = window.open( ... );
childwindow.parentwindow = self;
From this code, a child window: childwindow, is opened and it understands the variable 'parentwindow' to be the window from which it was launched.
Step 2
(The user browses through a few pages in childwindow to complete the sub-process. However, as the initial page unloads, the var parentwindow is lost.)
Step 3
(from remote window)
parentwindow.window.location = 'childwindowresult.html?childwindowresults=' + childwindowresults;
window.close( );
Is there a way to maintain the variable 'parentwindow' as the user navigates through 'childwindow'? Am I using the wrong approach altogether?