View Full Version : Change activation of window

02-20-2003, 11:52 AM
Good morning,

I have a question regarding multiple windows: change which one is active.


A. I have a main window in which my site is displayed (normal home-page).

B. When I activate a link on this page a second (smaller) window will appear with the requested information in it.

C. At this time, I can also activate a link in the main window and the newly requested information will appear in it.

Conclusion so far:

This works fine.


When activating another link in the main window (see C) the second window will disappear behind the main window.

Requested solution:

Ofcource, I can activate the second window at the bottom of the screen, or by minimize the main window, however what I like to know if it's possible to make the the second window active whenever a new document is displayed in this window, e.g. when I activate a link in the main window.


Thankx in advance,

02-20-2003, 02:23 PM
Add a focus() to the onload tag of your popup window. Every time it is reloaded it will gain focus.

<body onload="self.focus()">

02-20-2003, 03:57 PM
Long explanation.... short answer,
It works perfect, thankx