Nuclear Member
Posts : 4 Join date : 2011-05-11
| Subject: How to keep listbox selection saved Wed May 11, 2011 10:44 pm | |
| The below code is part of my Page1.html, the resulting value from Ecat will be displayed in Page2.html, where people can go back to Page1.html and edit them again. My Perl code works in a way that when people choose to go back to Page1.html, it will pass the user selection results back to $Ecat$. For example, if users selected 'a' and 'c', the value of $Ecat$ will be 'ac'. My question is how can I keep 'a' and 'c' selected within the listbox, when users go back to Page1.html? Thank you. - Code:
-
<select name = Ecat value="$Ecat$" multiple="multiple" size="4" style="width:294px;"> <option value="a">audi</option> <option value="b">bmw</option> <option value="c">Chevy</option> <option value="d">Ford</option> <option value="e">Infiniti</option> </select>
|
|
Skilletrockz Super Moderator
Posts : 45 Join date : 2011-05-11
| Subject: Re: How to keep listbox selection saved Wed May 11, 2011 10:45 pm | |
| - Nuclear wrote:
- The below code is part of my Page1.html, the resulting value from Ecat will be displayed in Page2.html, where people can go back to Page1.html and edit them again.
My Perl code works in a way that when people choose to go back to Page1.html, it will pass the user selection results back to $Ecat$. For example, if users selected 'a' and 'c', the value of $Ecat$ will be 'ac'. My question is how can I keep 'a' and 'c' selected within the listbox, when users go back to Page1.html?
Thank you.
- Code:
-
<select name = Ecat value="$Ecat$" multiple="multiple" size="4" style="width:294px;"> <option value="a">audi</option> <option value="b">bmw</option> <option value="c">Chevy</option> <option value="d">Ford</option> <option value="e">Infiniti</option> </select>
you mean when users hit the browser back button? In this case the information. Usualy people use sessions to solve this but i don't know what implies this in your case. best regards |
|
Nuclear Member
Posts : 4 Join date : 2011-05-11
| Subject: Re: How to keep listbox selection saved Wed May 11, 2011 10:46 pm | |
| Thanks for the reply.
Not by clicking back button. I use a hidden command to load that page and I am already able to pass back the selection value to $Ecat$. |
|
Skilletrockz Super Moderator
Posts : 45 Join date : 2011-05-11
| Subject: Re: How to keep listbox selection saved Wed May 11, 2011 10:47 pm | |
| - Nuclear wrote:
- Thanks for the reply..
you are welcome, |
|
Sponsored content
| Subject: Re: How to keep listbox selection saved | |
| |
|