RadCombo Box with Javascript onClientClick

2 posts, 0 answers
  1. Bob
    Bob avatar
    1 posts
    Member since:
    Nov 2013

    Posted 19 Nov 2013 Link to this post

    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?");
            }
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 19 Nov 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top