Wednesday, April 15, 2009

How can I make a back button?

What kind of link, behavior can I add to a button (when clicked) will return to the page last viewed?  ie: back button

Thanks,

Rick

1 comment:

  1. Here's the scoop:

    JavaScript has its own equivalent of the Back button written into the language. The statements

    onClick = "history.back()"

    and

    onClick = "history.go(-1)"

    both mimic the action of clicking the Back button once.

    I tried out the first (history.back()) and it seems to work. I have not tried it to go from page to page to page; it may not work for that!

    Thanks for letting me research this. I found the answer here:

    SAMS Teach Yourself Ajax in 10 Minutes
    by Phil Ballard
    Publisher: Sams
    Pub Date: April 28, 2006
    Print ISBN-10: 0-672-32868-2
    Print ISBN-13: 978-0-672-32868-8
    Pages: 240

    ReplyDelete

Join the conversation!

Note: Only a member of this blog may post a comment.