please dont rip this site

JavaScript: The Definitive Guide

Previous Chapter 21
JavaScript Reference
Next
 

Location.replace() Method

Name

Location.replace() Method---replace one displayed document with another

Availability

Navigator 3.0

Synopsis

location.replace(url)

Arguments

url

A string that specifies the URL of the new document that is to replace the current one.

Returns

Nothing.

Description

The replace() method of the Location object loads and displays a new document. Loading a document in this way is different than simply setting location or location.href in one important respect: the replace() method does not generate a new entry in the History object. When you use replace(), the new URL overwrites the current entry in the History object. After calling replace(), that is, the browser's Back button will not return you to the previous URL; it will return you to the URL before that one.

Usage

When you are working with multiple frames and/or JavaScript generated documents, you sometimes end up with quite a few temporary or transient documents. If there are more than just a few of these documents, it becomes annoying to the user to back out of your web site with the Back button. If you use the replace() method to load these documents, however, you can prevent this problem.

See Also

"History", "Location", "Location.reload()"


Previous Home Next
Location.reload() Book Index Location.search

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell

file: /Techref/language/java/SCRIPT/definitive/refp_217.htm, 5KB, , updated: 2019/10/14 15:00, local time: 2024/11/27 09:34,
TOP NEW HELP FIND: 
3.133.108.172:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://techref.massmind.org/Techref/language/java/SCRIPT/definitive/refp_217.htm"> [Chapter 21] Reference: Location.replace()</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to techref.massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .