Client-Side JavaScript Reference
replace
Loads the specified URL over the current history entry.Method of
Location
Implemented in
JavaScript 1.1
Syntax
replace(URL)
Parameters
URL
A string specifying the URL to load.
Description
The replace method loads the specified URL over the current history entry. After calling the replace method, the user cannot navigate to the previous URL by using browser's Back button.
If your program will be run with JavaScript 1.0, you could put the following line in a SCRIPT tag early in your program. This emulates replace, which was introduced in JavaScript 1.1:
if (location.replace == null) location.replace = location.assign
The replace method does not create a new entry in the history list. To create an entry in the history list while loading a URL, use the History.go method.
Examples
The following example lets the user choose among several catalogs to display. The example displays two sets of radio buttons which let the user choose a season and a category, for example the Spring/Summer Clothing catalog or the Fall/Winter Home & Garden catalog. When the user clicks the Go button, the displayCatalog function executes the replace method, replacing the current URL with the URL appropriate for the catalog the user has chosen. After invoking displayCatalog, the user cannot navigate to the previous URL (the list of catalogs) by using browser's Back button.
Wednesday, November 16, 2005
Nazeer Logs
Previous Posts
- Filter code with Servlet 2.3 model: "Filter code w...
- In the U.S., when a job description states that a ...
- http://www.examulator.com/phezam/login.php
- JavaRanch Mock Exam List: "Mock Exam List The foll...
- An SCJP 1.4 certification primer
- Google Directory - Computers > Programming > Langu...
- SCJP Tiger Study Guide: "SCJP Tiger Study Guide"
- Macromedia Breeze Meeting
- Java Forums - How to use Session ID info to send s...
- RE: java session question
Subscribe to
Posts [Atom]

<< Home