|
|
Q1255 What do I need to know about window names?
irt.org | Knowledge Base | JavaScript | Window | Q1255 [ previous next ] Q1255 What do I need to know about window names?You open a new window in one of three ways:
1. start the browser
or from a window opened by the main window:
2. Using target on frame, href or form
will open popup and load page the first time and just load page if popup is already open 3. using window.open
There are exceptions to the name rule - if the "magic" targets/windownames: _top, _self, _blank are used, the opened window will be nameless, but can in situation 3 be given a name:
You can determine the name of the current window by asking and/or setting it:
You can get the windowHandle, which you will need to do things like closing or resizing a window by opening the window if you know the name:
Be aware that Internet Explorer 3 does not like this lack of page name and will open a blank window. A trick to close a named window would then be to load a page that closed itself:
Where closeit.html contained:
This will produce a warning if you didn't open that window yourself and if the history of that window contain more than one entry. |
-- div -->
|