View Full Version : Recent History Pages Storage
knguyen99
10-30-2002, 07:44 PM
How do I store the last 3 jsp with data on a list (3 links)?
When I click on either link, I will get back that page.
For example:
test1.jsp
test2.jsp
test3.jsp
if I am on page of test3.jsp, I select the history link of test1.jsp I will get back to test1.jsp with all the data as I left.
beetle
10-30-2002, 08:41 PM
Uhh. Searching. Looking.
Is there a javascript question in here?
:confused:
redhead
10-30-2002, 08:48 PM
i dont really understand what you are saying either...
do you mean something like:
<a href="javascript:history.back(1)">Back a page</a>
?
knguyen99
10-30-2002, 08:53 PM
Let's said I open Yahoo, AOL, then MSN.
I need to save (store) these 3 pages as a history list. I would like to show these links as my history as
Yahoo
Aol
Msn
as the link.
I can go back if I select either Yahoo or Aol.
beetle
10-30-2002, 10:22 PM
Javascript cannot do this. The history object exposes only 1 property: length and 3 methods: go(), back(), foward()
So, basically, with JS, you can only know how long the history is and navigate it, but you cannot determine what is in it or even where you are in it.
So, since it looks like you are using JSP, I suspect you will need to maintain session for users and display the links that way...although it would obviously only be possible to do this with pages within your domain and those which you have control over.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.