admin管理员组

文章数量:1332107

            Dim sb As StringBuilder = New StringBuilder()

        sb.Append("<script language=javascript>")

        sb.Append("     function SetValueInBody() {")
        sb.Append("         var _dllGetDynamicFieldKey = $find('" + _dllGetDynamicFieldKey.ClientID + "');")
        sb.Append("         alert('Set Value: ' + _dllGetDynamicFieldKey.SelectedItem);")
        sb.Append("     }")

        sb.Append("</script>")

I'm trying to get the selected item from a radComboBox in Jquery with the intention of populating a RadEditor against it. I'm generating teh JS in the back end as above where dllGetDynamicFieldKey is the RadComboBox, the above method is how I've seen it done to get the selected value however it always es back undefined for me when the alert is fired. Any ideas whats correct?

            Dim sb As StringBuilder = New StringBuilder()

        sb.Append("<script language=javascript>")

        sb.Append("     function SetValueInBody() {")
        sb.Append("         var _dllGetDynamicFieldKey = $find('" + _dllGetDynamicFieldKey.ClientID + "');")
        sb.Append("         alert('Set Value: ' + _dllGetDynamicFieldKey.SelectedItem);")
        sb.Append("     }")

        sb.Append("</script>")

I'm trying to get the selected item from a radComboBox in Jquery with the intention of populating a RadEditor against it. I'm generating teh JS in the back end as above where dllGetDynamicFieldKey is the RadComboBox, the above method is how I've seen it done to get the selected value however it always es back undefined for me when the alert is fired. Any ideas whats correct?

Share Improve this question asked Feb 19, 2010 at 9:23 IsrafelIsrafel 1,1622 gold badges15 silver badges29 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

Apologies, got it, I should have used .get_value() to get the selection

本文标签: javascriptRadComboBoxhow to get selectedItemStack Overflow