Click to See Complete Forum and Search --> : Focus Popup window after leaving opener


Deadmeat
02-04-2003, 11:17 AM
Hello all and thanks for any help in advance:

In my main browser window, I'm opening a popup window named "bookwalk" that does a window.opener.focus on load so it disappears into the background when it pops up.


Then I click through about 5 URLs in my main window, and am unable at that point to do a bookwalk.focus to bring the popup back to the foreground - I am assuming because my main page has changed.

Any advice?

Thanks!

gil davis
02-04-2003, 11:47 AM
I am assuming because my main page has changed.
You assume correctly.

Once a new page loads, you no longer have a parent or opener, and your former opener has no children (sob!). If "bookwalk" is the NAME of the window, you can reestablish a connection using:

var bookwalk = window.open("","bookwalk");

Then you can focus using:

bookwalk.focus();

Deadmeat
02-04-2003, 11:55 AM
Thanks Gil,

That seems to do the trick.