Results 1 to 4 of 4

Thread: Intuitive "Back" option on page...

  1. #1
    Join Date
    Oct 2005
    Location
    Liverpool, UK
    Posts
    87
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Intuitive "Back" option on page...

    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.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    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.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    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

  4. #4
    Join Date
    Oct 2005
    Location
    Liverpool, UK
    Posts
    87
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Thanks chaps - I'll give it a go.

    Cheers,

    N.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •