Select Box Selector

This function is used to select a single option in a select box. It assumes that you only have one form on your page which you really should anyway for valid HTML.

Input:
Select box object, Value of option to be selected,
Output:
None
function S$(oSel,selVal) { for (var ss=0; ss<oSel.length; ss++) { if (oSel.options[ss].value == selVal) oSel.selectedIndex = ss; break; } }