• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to invoke Browser's Back button functionality in HTML

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).]
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thanks for your replies.
-Hemanth
 
Hemanth Presingu
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
For my next feat, I will require a volunteer from the audience! Perhaps this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic