Click to See Complete Forum and Search --> : JavaScript Question


JavaCowboy
03-01-2002, 11:26 AM
I know this doesn't relate directly to Linux, but I have a question about JavaScript.

I'm working on an application that uses a pop-up Window to enter data, like a Wizard. When the user hits "submit" on the pop-up Window, the original page needs to change after the user has submitted their data. I've looked over the JavaScript API from the Netscape site, specifically, the Window object, and the window.parent property doesn't seem to point to the originating page.

My question is how would I get the JavaScript on the pop-up window page to interact with the originating window object?

jscott
03-02-2002, 03:29 PM
http://www.htmlgoodies.com/beyond/Test3.html on example

Ludootje
03-03-2002, 06:35 AM
therefore there's the programming section :)

JavaCowboy
03-04-2002, 12:21 PM
I figured it out:

In the pop-up window, refer to the opener variable. This variable points to the window that opened the pop-up window. So, if you want to point the opener window to a new page upon clicking a button or link in the pop-up window, all you have to do is this:

opener.document.location = "http://www.foo.com";
opener.focus;