View Full Version : keep value select box

05-29-2009, 11:05 PM
I have a dropdown select box in a shopping cart page.
With the dropdown select box customers can select options for their purchased items. They can also update the quanity of the products, this however refreshes the page and the select box looses the selected value.

How can I keep the selected value on page refresh.

Thanks for any help.

05-29-2009, 11:47 PM

The select box value has to be part of the form data that you send back to your server with the quantity update.
When the page gets generated again the server code sets the default of the select box to the value that was submitted with the form.