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.5
When you use the
NewWindow event in Internet Explorer 5.5, you may encounter the following problems:
- If you click a link that performs a window.open method to browse to a new site, you can successfully browse to the site the first time; however, it fails the second time.
- If you right-click a link and then click Open in New Window, it works the first time but does not work on subsequent attempts.
When you use the
NewWindow2 event in Internet Explorer 5.5, you may encounter the following problems:
- If you click a link that performs a window.open method to browse to a new site, you receive an "unspecified error" error message.
- If you right-click a link and then click Open in New Window, it does not navigate at all.
Symptoms in Internet Explorer 5
NewWindow 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:
- If you click a link that performs a window.open method to browse to a new site, it does not navigate at all.
- If you right-click a link and then click Open in New Window, you receive an "unspecified error" error message.
Symptoms in Internet Explorer 4.x
NewWindow 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:
- If click a link that performs a window.open method to browse to a new site, it does not navigate.
- If you right-click a link and then click Open in New Window, you receive an "unspecified error" error message.