Log in

View Full Version : Intuitive "Back" option on page...



NGJ
12-06-2005, 02:16 PM
I have a number of pages that could access a particular 'other' page on the site. In other words, it is possible to arrive at this 'other' page by various routes.

Is there a way to intuitively call & return to the known 'previous'.htm page (within a <a href" ">) rather than putting in a list of options to return to any of the possible pages...?

i.e.
<a href="page001.htm"> go back to page 1</a>
<a href="page002.htm"> go back to page 2</a>

...etc.

I'd be grateful if you didn't just suggest the user clicks the "<-Back" option from the browser menu.

Cheers,

N.

Twey
12-06-2005, 05:56 PM
You can use "javascript:history.go(-1);" to go to the last page visited. However, I must advise you that most of the time the user will just use the browser's "back" button anyway.

mwinter
12-06-2005, 07:24 PM
You can use "javascript:history.go(-1);" to go to the last page visited.You could, but not only is that rather useless where client-side scripting is enabled, but it can also lead to orphaned pages. Have you ever reached a page from an external link (search results, say) to find links like the one you suggested that, for all intents and purposes, go nowhere? Frustrating.

The best way would be to generate the document dynamically server-side, either by inserting the same content into different documents with different links, or pass information via the query string which can be used to generate the link.

Mike

NGJ
12-07-2005, 10:16 AM
Thanks chaps - I'll give it a go.

Cheers,

N.