faqts : Computers : Programming : Languages : JavaScript : Windows

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

44 of 70 people (63%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

How can I check whether a window is still open?

Mar 16th, 2000 15:15
Martin Honnen,


When you open a window with window.open you keep a reference as in
  var win = window.open('whatever.html', 'windowName');
You can then later check the closed property e.g.
  if (win && win.closed)
respectively
  if (win && !win.closed)