I think the answer is value doesnt exist client side so it cant be retrieved. There are easier ways to get index tho (assuming whatever initialization is complete).
selected index: $find("<%=cboName.ClientID%>").get_hiddenFieldControl().value;
selected index (again): $find("<%=cboName.ClientID%>").get_selectedIndex();
selected text: $find("<%=cboName.ClientID%>").get_textBoxControl().value;
As far as I can tell, validating a combobox on the client requires some faith in index or text, or some kind of server side workaround.
To provide a direct answer to the subject line, a javascript array could be created server side with each combobox value and then referenced client side by selected index...
codebehind:
// write combobox values to asp:literal
foreach (ListItem i in cboName.Items)
litCboValues.Text += """ + i.Value.Replace(""", "\"") + "", ";
litCboValues.Text = litCboValues.Text.TrimEnd(new char[] { , , });
aspx:
<script>
// array of values
var cboValues = [ <asp:Literal id="litCboValues" runat="server" /> ];
// add an alert to the combobox to test
function pageLoad()
{
$find("<%=cboName.ClientID%>").get_textBoxControl().onblur = function () {
alert( cboValues[$find("<%=cboName.ClientID%>").get_selectedIndex()] );
};
}
</script>
<asp:ComboBox id="cboName" runat="server" ...