Article ID: 241109
The window.closed property is used when a parent window opens a child window using a window.open call and the parent or child needs to know when the child or parent window, respectively, has been closed.
The opener property refers to the window that opened the current one (using window.open method call). When the child window checks the opener.closed property, it is false when the parent is open and true otherwise; that is, the value returned is reversed.
When the parent checks the status of the child window using the child window's closed property, the same incorrect results are returned.
The workaround for the child is to have the parent set a variable in the child window that maintains the correct status of the parent window. The child then uses this variable instead of the opener.closed property.
The workaround for the parent is to negate the child window's closed property. It is safer and recommended to use the same logic as for the child window to ensure that the logic does not break when this behavior is fixed in a later version of Internet Explorer
The following HTML code demonstrates the bug and also how to work around the problem.
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
For more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:
http://msdn.microsoft.com/ie/(c) Microsoft Corporation 1999, All Rights Reserved. Contributions by Kusuma Vellanki, Microsoft Corporation.
Article ID: 241109 - Last Review: June 19, 2014 - Revision: 4.0
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.