The information in this article applies to:
SYMPTOMSA Web page hosted in a WebBrowser control may encounter the following runtime error when attempting to use the window.closed property: This error occurs only when there is no other instance of Internet Explorer running. It works fine if an instance of Internet Explorer is launched, before running the application that hosts the WebBrowser control. RESOLUTION
If the WebBrowser control application handles the NewWindow2 event to create new browser windows, no error occurs, but the window.closed property always returns false.
WebBrowser applications that do not handle the NewWindow2 event can catch the runtime error in client script using javascript exception handling or "On Error Resume Next" in VBScript. Here is a JavaScript example:
NOTE: Javascript exception handling requires version 5.0 of the JScript engine, which ships with Internet Explorer 5.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. REFERENCESFor additional information, click the article number below to view the article in the Microsoft Knowledge Base: Q184876 HOWTO: Use the WebBrowser Control NewWindow2 EventFor more information, please see the MSDN Web Workshop: http://msdn.microsoft.com/workshop/default.asp Additional query words:
Keywords : kbDHTML kbIE400bug kbIE401bug kbWebBrowser kbIE401sp1bug kbIE401sp2bug kbGrpInet kbIE500bug kbDSupport |
Last Reviewed: November 20, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |