Home arrow JavaScript arrow Methods of the DOM Location Object
JAVASCRIPT

Methods of the DOM Location Object


In my last article I discussed the Dom Location Object Properties. Here, we will go over the Methods of those same objects, and if there is time, I will even cover the History Objects, which give you control over the user’s history list, allowing you to give them access to past URLs and advanced navigation.

Author Info:
By: James Payne
Rating: 5 stars5 stars5 stars5 stars5 stars / 2
December 08, 2008
TABLE OF CONTENTS:
  1. · Methods of the DOM Location Object
  2. · Assign() Gives You Tasks
  3. · The Jatrix…Reloaded()
  4. · Replace()

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Methods of the DOM Location Object
(Page 1 of 4 )

Just to recap, the Dom Location Object Properties we covered in the last article included the hash, which allowed us to set or retrieve the part of the URL that follows the hash (#) symbol, used for anchors in HTML. We also discussed the host property, which returned the host name and the portnumber, except in cases where the portnumber is the default value of 80, in which case no portnumber was returned.

We also covered hostname, used to return just the hostname, and port, which returned or set just the portnumber, with the exception of course of the default value of 80. We also looked at href, which returned or set the entire URL, and pathname, which set or returned the path, such as /images/vacation/hippo.html.

In addition we covered protocol, which told us the protocol being used (ie; http: or ftp: ) and last, but certainly not least, we discussed search, which we can use to set or return the portion of a URL that follows the question mark (?).

Before we begin discussing the Methods of the Dom Location Objects, take a quick gander at our table:


Name

What It Does

Type

assign()

Used when you wish to load a new document/page

Method

reload()

Used when you want to reload the current page/document

Method

replace()

Used when you wish to replace the current page/document with a new one

Method


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Tutorials for Beginners
- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 4 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials