Click to return to the Reusing Browser Technology home page    
IHTMLListElement Interfac...     IHTMLLocation::assign Met...     Interfaces and Scripting ...    
Web Workshop  |  Reusing Browser Technology

IHTMLLocation Interface


This interface contains information about the current URL.

IHTMLLocation Methods

assign Sets the current location to the given URL. This method loads the given document specified by the URL if it exists.
get_hash Retrieves the string following the # symbol in the current URL.
get_host Retrieves the host portion of the current URL.
get_hostname Retrieves the hostname portion of the current URL.
get_href Retrieves the URL of the current browser location.
get_pathname Retrieves the file or object path from the current URL.
get_port Retrieves the port number from the URL.
get_protocol Retrieves the protocol portion of the URL that the browser uses to locate the item. The protocol portion, which indicates the access method, includes the initial substring of the URL up to and including the first colon.
get_search Retrieves the substring that follows the ? symbol in the current URL. This is the query string or form data.
put_hash Sets the string following the # symbol in the URL.
put_host Sets the host portion of the current URL.
put_hostname Sets the hostname portion of the current URL.
put_href Sets the entire URL for the browser. Setting this property causes the browser to navigate to the location specified by the URL.
put_pathname Sets the file or object path of the current URL.
put_port Sets the port number of the current URL.
put_protocol Sets the protocol portion of the URL that the browser uses to locate the item. The protocol portion, which indicates the access method, includes the initial substring of the URL up to and including the first colon.
put_search Sets the substring that follows the ? symbol in the current URL. This is the query string or form data.
reload Reloads the current page.
replace Replaces the current document by loading the document at the given URL. This method also removes the current document from the browser's session history.
toString Retrieves a string representation of the location object that is the href of the current browser location.

Interface Information

Implementation System (Mshtml.dll)
Inherits from IDispatch
Header and IDL files Mshtml.h, Mshtml.idl
Minimum availability Internet Explorer 4.0
Minimum operating systems Windows 95, Windows NT 4.0

Windows CE

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.