[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: history.back(-2) (ignore)



Christian Lanctot wrote:
> 
> Help!
> 
>         I've got a little problem that bugs me alot: A user comes into
> my first page. It advises you to use Netscape 2.0. If you already have it
> it will jump to the next page (using <META refresh). Then that page does
> a history.back(-2)(since it's not ready yet). The problem is that the
> history.back(-2) jumps back to the preceeding page wich then goes to the
> next page wich then comes back, and on and on ...
> 
> diagram :
> 
> user url  -----> index (META) ----> homepage (history.back(-2)) |
>                         ^----------------------------------------
> 
> as you can see: it loops between index and homepage continously.
> What I want, is to send the user back to the place he originaly came
> from. In this case (user url)
> 
> Want to see it in action ? go to my home page at:
> 
> http://www.generation.net/~kristian
> 
> then it automatically goes to my jump point. Next, click the Diffusion
> Graphique Logo and watch what happens. It's supposed to come all the way
> back to my jump point.
> 
> NOTE: I've also tried history.back(-3) and history.back(-4) with no
> success.
> 

Ignore this message, i've found the way to do it. I kind of jumped the 
gun by sending this E-Mail (sorry).

But in case somebody is interested in knowing how to get around the 
situation as described above, this is the way:

in the last page in the chain, replace history.back(-2) by 
history.go(-2). The important thing to note here is :

history.go(-2) and not history.back(-2).

It now works on my server. Yeah!!!!



-- 

Christian Lanctot
e-mail: kristian@generation.net
Web   : http://www.generation.net/~kristian/
--------------------------------------------------------------------
For help about the list, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
List archives and pointer to FAQ: http://www.obscure.org/javascript/