From: FAQ server on 19 Apr 2010 19:00 ----------------------------------------------------------------------- FAQ Topic - How do I check to see if a child window is open, before opening another? ----------------------------------------------------------------------- var myWin; function openWin(aURL) { if (!myWin || myWin.closed ) { myWin = window.open(aURL,'myWin'); } else { myWin.location.href = aURL; myWin.focus(); } } Popup windows cause usability problems and are generally best avoided. https://developer.mozilla.org/en/DOM:window.open http://msdn.microsoft.com/en-us/library/ms533574%28VS.85%29.aspx http://docs.sun.com/source/816-6408-10/window.htm#1201877 http://www.useit.com/alertbox/990530.html The complete comp.lang.javascript FAQ is at http://jibbering.com/faq/ -- The sendings of these daily posts are proficiently hosted by http://www.pair.com.
|
Pages: 1 Prev: oxycontin and valium Next: How to tell which button a user pressed? |