Click to See Complete Forum and Search --> : Display the content of the text box portion of a dropdown in javascript


mpoincare
January 4th, 2003, 11:09 PM
I want to know what property in java script allows to refer to the content the value of the text box portion of a dropdown list. I know the property "SelectedIndex" refers to the value (index). For example if the selected value of the dropdown list is 2 and the corresponding text is "United States" what property in Java script will allow me to refer to the content "United State"?

websmith99
January 6th, 2003, 01:47 PM
document.forms['yourformname'].elements['selectname'].options[document.forms['yourformname'].elements['selectname'].selectedIndex].text


:cool: