The Window Phase of Chrys’s Approach to ACP is similar to the Document Phase. However, instead of having HTML documents (pages) opened within one browser window, you open both browser windows. This is the ninth part of a twelve-part series on Active Client Pages.
The Window Phase of Chrys`s Approach to ACP - Examples of Window Properties and Methods (Page 2 of 4 )
In this section we look at examples of the window properties and methods above. Note that the word "window" refers to the current window.
Remember that JavaScript in the BODY element is executed as the page (having the script) opens (is loading), while script that is in the HEAD element is not executed as the page opens. The functions in the script in the HEAD element have to be called by events (e.g clicking a button). You can try all the following examples.
Examples of Window Properties
Window closed Property
Definition and Usage
The closed property returns a Boolean value that specifies whether the window has been closed.
Syntax
window.closed
Example
The following example checks whether the new window has been closed: