Microsoft KB Archive/181779

= DOC: Setting Cancel to TRUE in NewWindow2 Stops Navigation =

Article ID: 181779

Article Last Modified on 12/10/2003

-

APPLIES TO


 * Microsoft Internet Client Software Development Kit 4.0
 * Microsoft Internet Client Software Development Kit 4.01
 * Microsoft Internet Explorer 4.0 128-Bit Edition
 * Microsoft Internet Explorer 4.01 Service Pack 2

-



This article was previously published under Q181779



SUMMARY
The 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 INFORMATION
Assuming 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: kbbug kbfix kbdocfix kbdocerr KB181779

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.