DOC: Setting Cancel to TRUE in NewWindow2 Stops NavigationLast reviewed: February 25, 1998Article ID: Q181779 |
The information in this article applies to:
SUMMARYThe documentation installed with the Internet Client SDK versions 4.0 and 4.01 states that setting the Cancel flag to TRUE in an event handler for the NewWindow2 event prevents the new window from opening. This is correct. However, the documentation also states that the navigation will occur in the current browser window. This is incorrect. By design, the new browser window does not open and the intended navigation fails. This error has been corrected in the online version of the Internet Client SDK, which is available at http://www.microsoft.com/msdn/sdk/inetsdk/help.
MORE INFORMATIONAssuming a Visual Basic project that uses the Web Browser Control, when the following Visual Basic code is executed in response to "window.open" in script or "Open In New Window" command from the context menu, no new window will open and no navigation will occur:
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean) Cancel = True End Sub Keywords : AXSDKWebBrowser kbdocerr kbdocfix Technology : internet Version : WINDOWS:4.0,4.01 Platform : WINDOWS Issue type : kbbug Solution Type : kbfix |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |