I am trying to figure this out now for a bit and its driving me nuts.
I have values in a database that are for a select box they are not in a certain order so .listindex is out of the order. I know the value of the select box and send that to my function. how can i change the selected on without listindex.
like i know the right value is abc
<option SELECTED value="abc">abc</select>
<option value="def">def</select>
see what i want to do is be able to change the selected from one to the other with a function without using listindex as i know how to do that already. and i can't use a if statement on values like abc as they could change if the database values change.
I have values in a database that are for a select box they are not in a certain order so .listindex is out of the order. I know the value of the select box and send that to my function. how can i change the selected on without listindex.
like i know the right value is abc
<option SELECTED value="abc">abc</select>
<option value="def">def</select>
see what i want to do is be able to change the selected from one to the other with a function without using listindex as i know how to do that already. and i can't use a if statement on values like abc as they could change if the database values change.