I’ve searched around for this, but cannot find a direct answer so here it goes.
I have a drop down list with some options – populated via HTML, once an option is selected and the user submits the form the value of the option they’ve selected is inserted into the database. My problem arises when they then return to the drop down list, they are displayed the option that is at the top and not the one they previously accepted. How would I go about setting the one selected by the user as the default option in the drop down list?
(Javascript and jQuery are welcome)
I’ve searched around for this, but cannot find a direct answer so here it
Share
The best approach would be to modify the “selected” attribute of the option what was just inserted into the database, using your server-side scripting language.