Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Previous screen in HTML

edited November 2006 in Vanilla 1.0 Help
This is not a Vanilla question, but HTML, but I'm sure some of you gurus know the answer.

It is possible to have some web pages (say a "Help" or "About" page) which can be reached from many pages, and which the visitor will want to return to the page they came from. Using the browser's "Back" button achieves this, provided a search engine didn't deliver the visitor to that page first up. So I want to provide a small menu that allows visitors to choose between "Back to previous", the Home page or a couple of the more obvious connecting pages.

So, can anyone tell me please, is there a simple way in HTML to duplicate the "back" button? I presume this isn't a difficult function for the browsers to use because they have a history, but can I use that history in my HTML?



  • Options
    3stripe3stripe ✭✭
    edited November 2006
    I think you mean something like this...?

    <a href="#" onClick="history.go(-1)">Back</a>

  • Options
    Better yet...

    <a href="javascript:void()" onClick="history.go(-1)">Back</a>

    The # usually takes you to the top of the page first then takes you back, a bit ugly.
  • Options
    Thanks heaps, I knew someone would know. I'll try it.
This discussion has been closed.