Location

Team-Fly    

 
Webmaster in a Nutshell, 3rd Edition
By Robert Eckstein, Stephen Spainhour
Table of Contents
Chapter 11.  JavaScript


Location Client-Side JavaScript 1.0

Current browser location
 location  window  .location 

Properties

The Location object defines the same URL- related properties that the Link object does, with the exception of the target. See the Link object for a description of the hash, host, hostname, href, pathname, port, protocol, and search properties. Setting any of these properties causes the browser to load and display the document from the new URL. As a shortcut, you can also load a new document by assigning a URL string to the location property of the Window.

Methods

reload( force )

Reloads the current document from the cache or the server. The force argument is optional. If true, it forces a complete reload, even if the document has not been modified. Returns nothing. JS 1.1.

replace( url )

Replaces the current document with a new one, without generating a new entry in the browsing history. Returns nothing. JS 1.1.

See Also

Link, Window.location


Team-Fly    
Top


Webmaster in a Nutshell
Webmaster in a Nutshell, Third Edition
ISBN: 0596003579
EAN: 2147483647
Year: 2002
Pages: 412

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net