Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page count

Status
Not open for further replies.
Aug 2, 2002
28
GB
Hi, Im fairly new to javascript and was wondering whether there was a way to count the number of pages visited in a single session.

What I am trying to do is a simple breadcrumb navigation that would use the
javascript:history.go(-1) replacing the -1 with the counted variable so that the user can go back to a visited page with the same details without re-entering form selection criteria. For example:

Home > Flights > Accommodation > Prices

Where

Home would be javascript:history.go(-3)
Flight would be javascript:history.go(-2)
Accommodation would be javascript:history.go(-1)

Any help would be most appreciated.

Thanks.
 
You could use cookies and keep a running tab of pages and convert the cookie into an array of pages.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top