To get the text of the selected item in the dropdown list in java script

computethat

New Member
I want to get the text of the selected item in the drop down list. I tried the following code \[code\]var e = document.getElementById("ddlTime.ClientID"); var selectedTime = e.options[e.selectedIndex].text;\[/code\]but it gives me "Unable to get value of the property 'options': object is null or undefined"can any one please help me out with this ?
 
Back
Top