mrgstiffler
[H]F Junkie
- Joined
- Dec 20, 2000
- Messages
- 13,408
I've looked up a few examples on how to do this, but none of them seem to work anymore.
I want to be able to set the selected attribute on a dropdown menu based on the option text NOT value.
I want to be able to set the option with "Second Option" text as selected. Everything I've tried has failed failed failed.
I want to be able to set the selected attribute on a dropdown menu based on the option text NOT value.
Code:
<select id="dropDownMenu">
<option value="0">First Option</option>
<option value="1">Second Option</option>
<option value="2">Third Option</option>
</select>
I want to be able to set the option with "Second Option" text as selected. Everything I've tried has failed failed failed.