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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

link or button for going back to previous page - but to the link originally clicked

Status
Not open for further replies.

pendle666

Technical User
Jan 30, 2003
295
GB
Hello all,

I'm not sure if my query belongs here or in Javascript....

I have a long list of items and some are linked to further information on that item.

What I want is when a person has finished reading the further information, they click "back" but rather than just to the previous page, I want it to go to the point where they had clicked for the further info.

Is such a thing possible?

Many thanks

thank you for helping

____________
Pendle
 
Technically yes. You would need to make all your links named anchors, and the back button be a link also with the anchor name.

In your list of items:

Add Anchors for said items:
Code:
<a name="[b]anchorname[/b]">more code here</a?
[//code]
And in our info page, the back link:


[code]
<a href="backtopage.html[b]#anchorname[/b]">GO BACK</a>

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
Many thanks for that. I'll have a think and see what I want to do - there are over 5000 pages of "additional information" !!!



thank you for helping

____________
Pendle
 
This being the HTML section you have no choice other than to hard code the solution

javascript (forum216) or whatever server side code is available will give more possibilities.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Chris is indeed correct. If you are using some type of server side language, you can dynamically create the anchors, and send the anchor name to the detail page in the URL to also dynamically create the back link.

This of course would fall outside the scope of static HTML.

You will have to look into how you are creating these 5000 pages of additional information.



----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
Why not just display the information in a new screen without any links in it. When they have finished reading the info, the close the screen and are back to where they started.

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top