This is a migrated thread and some comments may be shown as answers.

RadCombo Box with Javascript onClientClick

1 Answer 224 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 19 Nov 2013, 10:02 AM
Hi,

I have a RadComboBox to which i want some Javascript to be fired onClientClick of the RadComboBox.

I have set up a simple alert but it does not seem to work. 

Please help.

Thanks

.NET Code:
<telerik:RadComboBox ID="RadComboBoxDropDown" runat="server" OnClientClick="show();"/>

Javascript:
function show()
        {
            Alert("Are you sure you want to submit the page?");
        }

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 19 Nov 2013, 10:47 AM
Hi Bob,

The RadComboBox doesn't have any onClientClick event. In order to call the OnClick event for RadComboBox on the client side, Please try the following code snippet.

ASPX:
<telerik:RadComboBox ID="RadComboBox1" runat="server" onclick="show();">
</telerik:RadComboBox>

JavaScript:
<script type="text/javascript">
    function show() {
        alert("Fired");
    }
</script>

Thanks,
Princy.
Tags
ComboBox
Asked by
Bob
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or