I have the following HTML element:
Annual Leave&l
Suppose your form is named form1:
function selectValue(val) { var lc = document.form1.leaveCode; for (i=0; i<lc.length; i++) { if (lc.options[i].value == val) { lc.selectedIndex = i; return; } } }