Looping through history.back() until a different page

R

Randy Webb

Otto Wyss said the following on 1/18/2007 2:53 PM:
On a page of mine a user might submit data several time, which adds an
entry to the history each time (similar as
http://www.google.com/trends?q=iPod,+iPhone&ctab=0&geo=all&date=all).
Yet later the user wants to go back to the previous page in one step.
Now is it possible to loop backwards through the history until a
different page is reached? Has anybody coded something like this?

There are several possibilities, none of which includes trying to read
the history trail (which you can't). The closest you could do with
history would be a history.go(-2) or such with a button on the page to
activate it. It is full of flaws though.
 
O

Otto Wyss

Randy said:
There are several possibilities, none of which includes trying to read
the history trail (which you can't). The closest you could do with
history would be a history.go(-2) or such with a button on the page to
activate it. It is full of flaws though.
I know it's not possible to read the history and history.go(cnt) isn't
much better since cnt can't be determine correctly in all cases. Yet I
wonder if it were possible to use history.back() as long as the referrer
is identical as the current page. All what's needed is a variable which
persists across pages containing this page.

O.Wyss
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top