aspose file tools*
The moose likes Servlets and the fly likes How to invoke Browser's Back button functionality in HTML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to invoke Browser Watch "How to invoke Browser New topic
Author

How to invoke Browser's Back button functionality in HTML

Hemanth Presingu
Ranch Hand

Joined: Oct 01, 2000
Posts: 30
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

Joined: Nov 22, 2008
Posts: 18944
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

Joined: Oct 19, 2000
Posts: 75
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

Have a wonderful day and wish u success<p>S Chandra Mohan<br />sc_mohan_us@yahoo.com
Hemanth Presingu
Ranch Hand

Joined: Oct 01, 2000
Posts: 30

Thanks for your replies.
-Hemanth
Hemanth Presingu
Ranch Hand

Joined: Oct 01, 2000
Posts: 30
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to invoke Browser's Back button functionality in HTML