Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Apr 2009
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    keep value select box

    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.

  • #2
    New Coder
    Join Date
    May 2009
    Location
    LA, USA
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hello!

    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.

    Ken
    Last edited by VIPStephan; 08-14-2011 at 04:11 PM. Reason: removed self promotion link


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •