Article ID: 294870 - Last Review: May 11, 2006 - Revision: 3.0 BUG: Using NewWindow or NewWindow2 to Always Navigate in the Same Window Fails in Some InstancesThis article was previously published under Q294870 On This PageSYMPTOMS
When you host the WebBrowser control, you may want navigation to always occur in the same window. In this case, you can process the NewWindow or NewWindow2 notification to cancel the navigation. However, the NewWindow and NewWindow2 events do not always work as expected.
Symptoms in Internet Explorer 5.5When you use the NewWindow event in Internet Explorer 5.5, you may encounter the following problems:
Symptoms in Internet Explorer 5NewWindow works as expected in Internet Explorer 5 when you click a link that performs a window.open method to browse to a new site, or when you right-click a link and then click Open in New Window.However, when you use NewWindow2 in Internet Explorer 5, you may encounter the following problems:
Symptoms in Internet Explorer 4.xNewWindow works as expected in Internet Explorer 4.x when you click a link that performs a window.open method to browse to a new site, or when you right-click a link and then click Open in New Window.However, when you use NewWindow2 in Internet Explorer 4.x, you may encounter the following problems:
RESOLUTION
To work around this problem, open the link in a new window within your application instead of opening it in the same window. For additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
184876
(http://support.microsoft.com/kb/184876/EN-US/
)
HOWTO: Use the WebBrowser Control NewWindow2 Event
Note that the NewWindow event works in Internet Explorer 4.x and Internet Explorer 5. Thus, if you only have to support those versions of the browser, you can use the NewWindow event.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. MORE INFORMATIONSteps to Reproduce BehaviorIf you have a Microsoft Foundation Classes (MFC) application and use NewWindow to navigate in the same window, the following code fails in Internet Explorer 5.5:REFERENCESFor additional information, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
185538
(http://support.microsoft.com/kb/185538/EN-US/
)
HOWTO: Cause Navigation to Occur in Same WebBrowser Window
184876
(http://support.microsoft.com/kb/184876/EN-US/
)
HOWTO: Use the WebBrowser Control NewWindow2 Event
194242
(http://support.microsoft.com/kb/194242/EN-US/
)
FIX: window.open Causes Delay in NewWindow Event
For more information about reusing browser technology, see the following Microsoft Web site:
http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/overview/Overview.asp
(http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/overview/Overview.asp)
For more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:http://msdn.microsoft.com/ie/
(http://msdn.microsoft.com/ie/)
http://support.microsoft.com/iep (http://support.microsoft.com/iep) APPLIES TO
| Article Translations
|

Back to the top
