-
1. Re: cfselect preserve selected value on back
ilssac Apr 28, 2011 7:47 AM (in response to JeffHorne2)JeffHorne2 wrote:
go back using the browser's back button
UNLESS you have configured YOUR browser to ALWAYS request new data from the server when you hit the back button -- OR your web site has requested the browser to do so. The browser is going to ITS OWN CACHE and showing what it previously downloaded, including the state of all form controls.
In other words, this is most likely a BROWSER issue, NOT a server issue.
-
2. Re: cfselect preserve selected value on back
JeffHorne2 Apr 28, 2011 7:52 AM (in response to ilssac)Thank you ilssac but fields that are standard select and not bound retain their values. I have tested it on FF4, ie9, ie6 and Chrome and get the same results.
-
3. Re: cfselect preserve selected value on back
cfwild Apr 30, 2011 4:24 PM (in response to JeffHorne2)Hi Jeff,
I have found that a SESSION variable works very well in forms that potentially need to use the back button, or even refresh. If you submit the form the action page can set a SESSION variable for you. Then if the user hits back, you can test for the existence of a SESSION variable, if it exists, it's populated, if not, it comes up blank. You can even set the initial variable as a SESSION variable and forget the testing piece.
Having played with html and "hidden" values, a SESSION variable is a very handy piece of code.
Good luck!
<cfwild />


