.selectedIndex tells you the index of which item was selected, it does not give you the value. If you want the value, use .value.
See here: http://www.jasondahlin.com/2011/codi...validation.asp
The function in this page gives you the option of returning the text of the selected item, so you can ignore that part... here are the pieces you need:
Code:
var selectboxObj = document.getElementById(selectbox);
if(!selectboxObj) { return "";}
var selectedOption = selectboxObj.options[selectboxObj.selectedIndex];
var selectedValue = selectedOption.value;
return selectedValue;
replacing "selectBox" with "combo22", you get:
Code:
var selectboxObj = document.getElementById('combo22');
if(!selectboxObj) { return "";}
var selectedOption = selectboxObj.options[selectboxObj.selectedIndex];
var selectedValue = selectedOption.value;
return selectedValue;
Bookmarks