Rab Button OnClientClicked Needs to be Clicked Twice

2 posts, 0 answers
  1. Will
    Will avatar
    13 posts
    Member since:
    Jul 2013

    Posted 20 Aug 2013 Link to this post

    Hello I have a RadButton that I am using on Click to Hide and Show two Divs. In order for the event to fire the button needs to be clicked twice. After that It works fine.

    <telerik:RadButton ID="rbShowServiceMonitorDialog" runat="server" Text="Add A Service To Monitor"
                       OnClientClicked="showServiceMonitorConfig" ButtonType="LinkButton" UseSubmitBehavior="False" AutoPostBack="false"/>
    function showServiceMonitorConfig() {
        $telerik.$('#<%= rbShowServiceMonitorDialog.ClientID %>').click(function() {
            $telerik.$('.serviceMonitorView').hide('slide');
            $telerik.$('.ServiceMonitorConfiguration').show('slide');
     
        });
    }
  2. Will
    Will avatar
    13 posts
    Member since:
    Jul 2013

    Posted 20 Aug 2013 Link to this post

    Stupid me. I was calling the function on from the radbutton and then checking to see if it was clicked in JS.
Back to Top