Click here to Skip to main content
15,889,862 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using Telerik dropdown, want the selected value of that dropdown in JavaScript.
Using the following code

JavaScript
var drp1= $find("<%= DropDown1.ClientID %>");
var value = drp1.get_value();


I am getting drp1 as null.

Can anyone please help me on this.

Thanks in advance.

What I have tried:

var drp1= $find("<%= DropDown1.ClientID %>");
var value = drp1.get_value();
Posted
Updated 15-Jul-16 0:48am

1 solution

In jQuery,
JavaScript
var dropdownValue = $("#<%=DropDown1.ClientID %>").val();


In Javascript,
JavaScript
var dropdownValue = document.GetElementById("<%=DropDown1.ClientID %>").value;
 
Share this answer
 
Comments
Member 12636807 15-Jul-16 6:58am    
I tried with that also it is not working.

I am using OnClientClicked to call the javascript function.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900