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

Rab Button OnClientClicked Needs to be Clicked Twice

1 Answer 101 Views
Button
This is a migrated thread and some comments may be shown as answers.
Will
Top achievements
Rank 1
Will asked on 20 Aug 2013, 06:13 PM
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');
 
    });
}

1 Answer, 1 is accepted

Sort by
0
Will
Top achievements
Rank 1
answered on 20 Aug 2013, 06:40 PM
Stupid me. I was calling the function on from the radbutton and then checking to see if it was clicked in JS.
Tags
Button
Asked by
Will
Top achievements
Rank 1
Answers by
Will
Top achievements
Rank 1
Share this question
or