Something like this maybe...
Imagine you had the following list:
Code:
<select name="testselect"> <option value="first">first option</option> <option value="second">second option</option> <option value="third">third option</option>
</select>
You could then have a function like below:
Code:
function selectMe(val) {
for (var i=0; i<document.all.testselect.length; i++) {
if (document.all.testselect.options[i].value == val) {
document.all.testselect.options[i].selected = true;
}
}
}
So if you called selectMe with a value of "second", it would select the second option in the dropdown.
Is that what you meant?