A small JS Problem

Hi all, I would like to ask a small problem…

How do get a window to detect it is a pop-window and change the parent window’s URL? and after of which close the pop-window.

So is like on the parent Window(IE) I have selected a link to make the pop-window, then after it will process some data, but how I do change the URL of the parent Window using JS on the pop-window and the close the window? do I like type in this.close(URL)?

As I understand this correct: You want create a popup window in the moment you click on a link. THis popup window shall process some data and change the window url of the opener window and close itself after it? If so, thats easy ^^

The easiest way is to give each window a name. Then you can call them by their names and work with them like any other JS object.
Another way is to use the “opener” reference. Each new window opened with the “open()” function have an opener reference. So you can access it and change its location value and close the popup via “this.close()”. Thats all :slight_smile:

Hmm ok… so is

opener.window.close()?

opener.close() should be enough, there is no need for “window” as “opener” allready reference the opener window. But be aware not to close the popup too! If you opened the popup with “dependent=yes” it will be closed.

haha… Sorry for the late reply… but thanks!!!

THANK YOU