Easy A
Would you like to react to this message? Create an account in a few clicks or log in to continue.


 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

Share
 

 How to keep listbox selection saved

View previous topic View next topic Go down 
AuthorMessage
Nuclear
Member
Member
Nuclear

Posts : 4
Join date : 2011-05-11

How to keep listbox selection saved Empty
PostSubject: How to keep listbox selection saved   How to keep listbox selection saved EmptyWed 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>
Back to top Go down
Skilletrockz
Super Moderator
Super Moderator
Skilletrockz

Posts : 45
Join date : 2011-05-11

How to keep listbox selection saved Empty
PostSubject: Re: How to keep listbox selection saved   How to keep listbox selection saved EmptyWed 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
Back to top Go down
Nuclear
Member
Member
Nuclear

Posts : 4
Join date : 2011-05-11

How to keep listbox selection saved Empty
PostSubject: Re: How to keep listbox selection saved   How to keep listbox selection saved EmptyWed 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$.
Back to top Go down
Skilletrockz
Super Moderator
Super Moderator
Skilletrockz

Posts : 45
Join date : 2011-05-11

How to keep listbox selection saved Empty
PostSubject: Re: How to keep listbox selection saved   How to keep listbox selection saved EmptyWed May 11, 2011 10:47 pm

Nuclear wrote:
Thanks for the reply..

you are welcome,

Back to top Go down
Sponsored content




How to keep listbox selection saved Empty
PostSubject: Re: How to keep listbox selection saved   How to keep listbox selection saved Empty

Back to top Go down
 

How to keep listbox selection saved

View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Easy A :: How to keep listbox selection saved Edit-trash Useless :: Trash-