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

Is Popup already open?

Status
Not open for further replies.
Joined
May 9, 2000
Messages
446
Location
GB
Hi anyone know if its possible to determine whether a popup is already open?

Cheers
 
Yup.

Code:
var w = window.open('...', '...', '...');

if (w && !w.closed) alert("the popup is open");

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
Hi cLFlaVA cheers for the reply, what do I replace the ... bits with? the window name?
 
Ahh, sorry, I thought you knew that part already...

Code:
var w = window.open('thepage.html', 'my_win', '');

The third parameter is for different window properties. You can see a list of them here:
Hope this helps :)

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top