This is a migrated thread and some comments may be shown as answers.
selected value
1 Answer 25 Views
This is a migrated thread and some comments may be shown as answers.
Sigma
Top achievements
Rank 1
Sigma asked on 11 Jun 2012, 09:34 AM
 I am trying to get the combobox selected item and value in the javascript.  Does the accessing of combobox in javascript change based on the version you use?  I am using Telerik 2011.3.1305.35. 

 I have a javascript file and in that i have a function which will accept client id of the radcombobox as a parameter and now how do i get the selected index, selected item and value of that combobox? .

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 11 Jun 2012, 10:34 AM
Hi,

Try the following javascript to achieve your scenario.

JS:
<script type="text/javascript" >
  function OnClientClick()
        {
            var combo = $find("<%=RadComboBox1.ClientID %>");
            var index = combo.get_selectedIndex();
            var item = combo.get_selectedItem();
            var value = combo.get_value();
        }
</script>

Thanks,
Princy.
Asked by
Sigma
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Share this question
or