Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with new window...

Status
Not open for further replies.

secretsquirrel

Programmer
Mar 22, 2001
202
GB
Hi guys,

This problem's probably been posted before, but here goes...

I've got a list of three links. If a user clicks on any of these links, a new window (let's call it window X) is opened using target="_new".

If the user leaves window X open, returns to the original one and selects a different link, the new page will load into window X.

How can I bring the focus back to window X ? - bearing in mind that window X doesn't have a name, so I can't use anything like myNewWindow.focus()

Cheers in advance,

SS
 
Try putting this on the window's onLoad --

<body onLoad=&quot;window.focus();&quot;>

And that's assuming that you have control over the code of these popups. If you don't then you need to assign them a reference in order to do this.

:)
Paul Prewett
penny.gif
penny.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top