location HTML Object (Windows Embedded CE 6.0)

1/6/2010

The location object contains information about the current URL.

Properties

Property Data type Access Description

hash

String

Read/write

Sets or retrieves the part of URL starting from the pound sign (#) inclusive and beyond. If you change the hash, the browser scrolls up or down to the appropriate bookmark but the hash property does not reflect the change.

host

String

Read/write

Sets or retrieves the hostname of the page location.

In Internet Explorer Embedded, this property does not return the port number.

hostname

String

Read/write

Sets or retrieves the host name part of the page location.

href

String

Read/write

Sets or retrieves the entire URL as a string.

pathname

String

Read/write

Sets or retrieves the file name or path of the page location.

port

String

Read/write

Sets or retrieves the port number associated with the URL.

search

String

Read/write

Sets or retrieves the search (query) string portion of the URL. This includes the leading question mark.

Methods

Method Syntax Description

reload

location.reload

Reloads the current page.

This method does not take the ReloadSource parameter, which specifies whether to check reload the page from the browser's cache or to reload it from the server. Internet Explorer Embedded always checks against the server if the user is online.

replace

location.replace(URL)

Replaces the current document by loading the document at the specified URL (in the required URL parameter).

Requirements

Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Other Resources

Internet Explorer Embedded HTML Scripting Objects