I have a dropdown list on my form with Integer Values set and displaying text. When I run the following code to display the Value and then associated text, I find that the text is displayed in as value when it is not supposed to. Any work around to this please?
function OnddlChanged(dropdown) {
if( dropdown != null)
{
var selindex = dropdown.selectedIndex;
var selvalue = dropdown.options[selindex].value;
var seltext = dropdown.options[selindex].text;
document.getElementById('<%=Hidsel Key.ClientID %>').value = selvalue;
alert(document.getElementById('<%=Hidsel Key.ClientID %>').value);
alert(seltext);
}
}