PRB: NavigateComplete2, DocumentComplete Events Pass Incorrect URL Parameter (272095)



The information in this article applies to:

  • Microsoft Internet Explorer (Programming) 5.5

This article was previously published under Q272095

SYMPTOMS

When you try to browse to a Web site and are redirected to a res:// protocol error page, the URL parameter of the NavigateComplete2 and DocumentComplete events, as well as calls to the get_LocationURL method, may reflect the intended destination and not the error page URL.

For example, if you try to browse to http://www.someservername.com/nopagehere.htm and encounter "The page cannot be found" error, the URL parameter of the NavigateComplete2 and DocumentComplete events contains the following URL:

http://www.someservername.com/nopagehere.htm

and not:

res://C:\WINNT\system32\shdoclc.dll/http_404.htm#http://www.someservername.com/nopagehere.htm

Calling get_LocationURL (or accessing the LocationURL property) returns the same value.

This differs from previous versions of Internet Explorer.

RESOLUTION

To retrieve the actual URL, you can use the document.location.href property or IHTMLDocument2::get_location followed by IHTMLLocation::get_href in Microsoft Visual C++.

STATUS

This behavior is by design and allows you to match up BeforeNavigate2 and NavigateComplete2 or DocumentComplete events more easily.

Modification Type:MajorLast Reviewed:11/5/2003
Keywords:kbDHTML kbprb kbWebBrowser KB272095