Adding a "Back" button

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

I'm trying to install a "BACK" button that will return to
the previous page by the person browsing the website (no
specific return page as several other pages will access
this info page).

Maybe I'm just foggy today, but can't seem to find a way
to add at the end of my page.
 
In order to work in all browsers you must include the opening and closing
form tags as well, if using a form button.

<form>
<input type="button" value="Back" onClick="history.go(-1)">
</form>

Otherwise use plain text or a image as the link.
--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Where do you add this. I'm interested, but have never added my own code to
any text or buttons.
Can you explain more in detail where/how to add code to the text (labled
"Back").
 
Actually all you need to do is add the following text to your page in normal
view:

Back to previous page

then select it, right click hyperlink and enter:

JavaScript:history.back();

as the hyperlink.
--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
As an alternative, I'd suggest:
<script type="text/javascript">document.write('<a
href="javascript:history.back(-1);">Go Back</a>');</script>

By wrapping the link inside a script declaration, you can avoid having a
non-working link (which could confuse visitors) if the visitor has
JavaScript disabled in their browser.

I put up an example to illustrate this:
http://ww.maxgeek.com/sample/

Try it with JS enabled and disabled to see what I mean.

Good luck!
 
I tried this earlier, based on the earlier emails, and it did not work.
I tried again as you said... and it is working.

Great, thanks again
 
Back
Top