|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
If, as my documentation suggests, the history.go is "buggy" in multiframe documents in Navigator 3.0, and can only be called with values 1, 0, and -1 in IE, how do I go back more than 1 URL? Obviously history.back() takes me back one - but I need to go back 2 or 3. Is there another method that is safer?
|
|
#2
|
|||
|
|||
|
I was under the impression that history.back(2), history.back(3), etc... worked, at least for all version 4+ browsers.
The whole purpose of () is to send parameters with a function call, so when in doubt, try it. It would even be possible to use a variable that tracks how many clicks back you need, in which case you would do history.back(variablename). As a workaround for the older browsers, you might try using a while loop and call history.back() as many times as the value of your tracking variable. |
|
#3
|
|||
|
|||
|
The history.back(3) doesn't work. It simply ignores the parameter and just goes back 1 item in the history. I haven't yet tried to history.back loop, but that'll be my next attempt.
Thanks for the reply. I'm very new to javascript, and appreciate all suggestions. Sharon |
|
#4
|
|||
|
|||
|
use this:
history.go(x); where x is the number back or forth so: history.go(-2); would go 2clicks back here is a GREAT javascript ref. page for further questions (im a newbie also and this is a must 4allnewbies) http://developer.netscape.com/docs/...jsref/index.htm Ryan ------------------ |
|
#5
|
|||
|
|||
|
Thanks for your reply, Ryan. Because I read that the history.go was "buggy" under certain conditions and that it only allowed -1,0 and -1 in IE(which may have changed in later releases), I decided to go with the other suggestion which was a history.back "loop". I pass a number into a routine, which simply executes the history.back that number of times. It works fine.
Again thanks for taking the time to respond. Devshed subscriber/developers are the best! Sharon |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > History back |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|