please dont rip this site

JavaScript: The Definitive Guide

Previous Chapter 21
JavaScript Reference
Next
 

History.go() Method

Name

History.go() Method---revisit a URL

Availability

Buggy in Navigator 2.0 and 3.0, partially implemented in Internet Explorer 3.0

Synopsis

history.go(relative_position)
history.go(target_string)   buggy in 2.0

Arguments

relative_position

The relative position in the History list of the URL to visit. In Internet Explorer 3.0, this argument must be 1, 0, or -1.

target_string

A substring of the URL to be visited. This version of the go() method is buggy in Navigator 2.0 and not implemented in Internet Explorer 3.0.

Returns

Nothing.

Description

The first form of the History.go() method takes an integer argument and causes the browser to visit the URL that is the specified number of positions distant in the history list maintained by the History object. Positive arguments move the browser forward through the list and negative arguments move it backwards. Thus, calling history.go(-1) is equivalent to calling history.back(), and, in Navigator, produces the same effect as a user click on the Back button. Similarly, history.go(3) revisits the same URL that would be visited by calling history.forward() three times. Calling go() with an argument of 0 causes the current page to be reloaded (although in Navigator 3.0, the Location.reload() provides a better way of doing this). This form of the method is buggy in multiframe documents in Navigator 3.0, and in Internet Explorer, it can only be called with the values 1, 0, and -1.

The second form of the History.go() method takes a string argument. It is supposed to make the browser revisit the first (i.e., most recently visited) URL that contains the specified string. Unfortunately, in Navigator 2.0, this form of the method is buggy and may cause the browser to crash. This form of the method is not implemented in Internet Explorer 3.0.

Because of the various bugs and incompatibilities in this method, it is best avoided. Use the back() and forward() methods instead.

Bugs

This method does not work correctly in multiframe documents in Navigator 3.0, and may crash Navigator 2.0 when called with a string argument. Its behavior in Internet Explorer 3.0 is incompatible with Navigator 2.0.

See Also

"History", "History.back()", "History.forward()"


Previous Home Next
History.forward() Book Index History.length

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

file: /Techref/language/java/script/definitive/refp_159.htm, 6KB, , updated: 2019/10/14 16:00, local time: 2024/4/27 14:04,
TOP NEW HELP FIND: 
3.140.188.16: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://www.massmind.org/techref/language/java/script/definitive/refp_159.htm"> [Chapter 21] Reference: History.go()</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 www.massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .