Jump to content


Photo

browser back button keep input values


  • Please log in to reply
4 replies to this topic

#1 radalin

radalin
  • Members
  • PipPipPip
  • Advanced Member
  • 179 posts

Posted 07 September 2006 - 02:36 PM

Hi,

In some sites after submitting a form, when you click on back button of the browser, you see that your old inputs are kept and can be reused. How is this done? Is this the ability of the browser or some sort of other thing?
(Just like this site, in the page where you post a topic, click on back button and then forward button, what you have written in the inputs are not lost.)
How can I do this to my site too? Any help or article or tutorial or any helping material is welcome.

I'm not sure if that's the right place for this topic. I'm sorry if it's wrong.

Thanks.
Roy Simkes
Yet Another Parkyeri Developer

#2 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 07 September 2006 - 02:38 PM

If the inputs are kept after using the back button, it's because of the caching setup in the browser.  There's nothing in PHP that can do that.  Most browsers have settings to change this behavior.

Info: PHP Manual


#3 Gruzin

Gruzin
  • Members
  • PipPipPip
  • Advanced Member
  • 448 posts
  • LocationGeorgia

Posted 07 September 2006 - 02:43 PM

you can make a back link and use Javascript:history(back); It will solve your problem.

George
I don't need your script, I'll try to write it myself

#4 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 07 September 2006 - 03:01 PM

Again, the reaction of the browser will not always be the same.  Using Javascript to go back is the same thing as hitting the back button.

Info: PHP Manual


#5 stefands

stefands
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 13 October 2006 - 06:13 PM

This feature interests me. Is it as simple as (?):
<a href="javascript:history.back()">back</a>
From what I gather this can cause problems, how is this?
Many thx!
.:: who decides reason? .:...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users