Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to invoke Browser's Back button functionality in HTML

 
Hemanth Presingu
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to give success confirmation after a form is submitted and processed successfully. It is good to have a <Back> button along with the success message, which should be similar to the browser's back button.
How can i do this in html without hardcoding the URL.
Thanks for any replies.
-Hemanth
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u have to use somethign called a history object
<type=button value="back" onClick="history.back">
thats it dude, include this button on ur resulting page n when the person just have to click the button to go where he came from, adios

[This message has been edited by Matt Midcap (edited October 19, 2000).]
 
S Chandra Mohan
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u can do this by using a click even on a button
having code
'javascript:history.back[1]' for back
'javascript:history.forward[1]' for forward
hope this will be useful for u
bye
 
Hemanth Presingu
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks for your replies.
-Hemanth
 
Hemanth Presingu
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just checked on this on the web.
Often people ask if it is possible to simulate the back button of browsers by adding some kind of link to their page. The answer is that it is not possible using HTML nor CGI, but to understand that, we first have to know how the back button usually works.
This can be acheived using javascript, but again al browsers may not support javascript.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic