go back one page

  • Thread starter Thread starter DianaH
  • Start date Start date
D

DianaH

Does anyone know the code to tell a page to "go back" one level ... to the
page it was sent from.

I have a number of links that I need to repeat on different pages, but when
I add a "go back" button, I have to change the url that it goes to, on all
the pages.

Please and thanks.
Diana
 
OR <a href="#" onClick="history.back()">Back</a>

Both do exactly the same.
 
Do it matter where I place the code - does it need to be in close proximity
to the text/button?
Thanks for the responses Wally and Trevor.
Diana
 
It needs to be wrapped around the button, e.g.,

<a href="javascript:history.go(-1)"><img src="yourbutton.gif"></a>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top