[thelist] How to bring child window to the forefront using javascript?

Christian Heilmann codepo8 at gmail.com
Tue Mar 27 02:47:53 CDT 2007

> I have a browser page that opens a child window when a user clicks on a
> link. There are cases where
> users go back to the opener and not realizing they already opened the
> child window click on the link again. How do I bring the child window that
> is already open to the front?
> If I give the child window a name when I open it then clicking on the link
> in the opener will not open a new child window but it wont give an
> indication that the child window is already open.

Just set windowname.focus()  to bring it to the front.

Your example however shows that popup windows are just not a clever
idea any longer.

Chris Heilmann
Book: http://www.beginningjavascript.com
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/

More information about the thelist mailing list