www.webdeveloper.com
Results 1 to 4 of 4

Thread: Link to previous page using HTML

  1. #1
    Join Date
    Oct 2005
    Posts
    13

    Link to previous page using HTML

    Hi,
    I want a link which when clicked will take the user to previous page. i.e. I have a single error page and this page is accessed by many other webpages. I need to have a link on this error page which will take user back to the previous page from where it was activated.

    Can any one help me with this please.

    Thank you in advance.
    Last edited by m_kk; 01-23-2006 at 06:01 PM. Reason: Missed extra para

  2. #2
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    You can't do it with just HTML unless you're creating the error page dynamically. You can do it with Javascript.

  3. #3
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,617
    This will require JavaScript or some server-side scripting - it cannot be done with HTML alone.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  4. #4
    Join Date
    Oct 2005
    Location
    Gold Coast, Australia
    Posts
    2,115
    Code:
    <a href="javascript:history.go(-1)">back</a>
    This is only a simple js example, however there are many flaws to js, and therefore some server-side scripting would best suit this job, as the others said

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles