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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

popup windows

Status
Not open for further replies.

LaurelRose

Programmer
Apr 11, 2001
2
0
0
US
Thank you to those who responded to my last thread. I used the onBlur="this.focus()" function to keep the popup windows in focus, but it did not produce the results I need. I have three popup windows, so the onFocus function caused confusion when used on all three popups. I think what I need is when the user clicks on a link bringing up a popup, and then clicks on the same link, the already opened popup comes back instead of a new window with the same html. Is this possible to do?
 
What about this...
You have your fxn that runs the window.open statement.

Establish an array referencing the three popup windows.

When the user clicks the link, test to see if the window is already open, and then set the focus to the appropriate one.

 
Yes it is possible to do.
Try this:
Code:
 var myWin = false

funtion popup1(){

if(!myWin || myWin.closed)

mycallWind=open("mypage","_",width,height)
mycallWind.focus()
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top