| Welcome to WebmasterWorld Guest from 126.96.36.199 |
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
|Subscribe to WebmasterWorld|
|Remembering <select> box value|
| 9:57 am on Sep 2, 2009 (gmt 0)|
I have 2 <Select> boxes
The 1st one is populated upon page load (PHP)
Upon submit the page will display a preview of the user inputs, with 2 submit buttons [send] and 
My problem is if the user choose to edit, how can I make it that 2nd select box remember its value since after a page reload the 2nd select box doesnt have any contents (options),
Adding options to the 2nd select box is triggered by the 1st select box hence the following code is not possible.
<option value="value_here>" selected>Text Here</option>
note : The 2 select boxes pulled values from a DB table.
| 12:37 pm on Sep 2, 2009 (gmt 0)|
Try including an input type=hidden with no value on initial load, save result of second selection there, hopefully it will still be there on page reload.
| 2:23 pm on Sep 2, 2009 (gmt 0)|
Stuff the values in the querystring?
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
© Webmaster World 1996-2013 all rights reserved