window.opener from SECONDARY Popup
Posted on 2003-03-13
I have a Main window (MainWin) that calls window.open() to open up a child popup window (UserInfoWin). This works fine. That Popup window spawns a SECONDARY popup (UserEditWin) via another call to window.open() AND THEN UserInfoWin closes itself using self.close();. The user then works with the data in UserEditWin, and when they click a link, I would like the following to happen:
I would like UserEditWin to be able set a value in a form (myForm) in the MainWin, and then submit that form. If it was UserInfoWin that was setting the values then I could just call window.opener.myForm.submit(), but it is not the direct opener of the window (UserInfoWin has closed).
I have tried referring to this window by name, AKA:
But apparently this MainWin is not referancable globally because I get a "Not Defined" error.
Any ideas on how to get this working? How can I refer to windows from other (unrelated) windows?
thanks in advance