Nov 3, 2004 #1 vanillapod MIS Joined May 9, 2000 Messages 446 Location GB Hi anyone know if its possible to determine whether a popup is already open? Cheers
Nov 3, 2004 #2 cLFlaVA Programmer Joined Jun 14, 2004 Messages 6,450 Location US 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! Upvote 0 Downvote
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!
Nov 3, 2004 Thread starter #3 vanillapod MIS Joined May 9, 2000 Messages 446 Location GB Hi cLFlaVA cheers for the reply, what do I replace the ... bits with? the window name? Upvote 0 Downvote
Nov 3, 2004 #4 cLFlaVA Programmer Joined Jun 14, 2004 Messages 6,450 Location US 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: http://www.devguru.com/Technologies/ecmascript/quickref/win_open.html Hope this helps *cLFlaVA ---------------------------- Lois: "Peter, you're drunk!" Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking! Upvote 0 Downvote
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: http://www.devguru.com/Technologies/ecmascript/quickref/win_open.html Hope this helps *cLFlaVA ---------------------------- Lois: "Peter, you're drunk!" Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!