Determining whether a browser window is open or not
The closed property of the window object
Ok, let's actually do an example. Suppose I decide to open a new window using the below code:
Now, let's say I've also created a script somewhere following that that reloads the contents of this newly opened window every 10 seconds (perhaps to serve up a new ad banner periodically, for example). This code might look something like this:
You can also use the "closed" property on the window.opener object to determine whether the window that opened the window in question is still open (are you still with me?). For example:
Pretty neat, uh?