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

stop button double click

2 Answers 174 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Stacy
Top achievements
Rank 1
Stacy asked on 28 Jul 2014, 03:59 PM
I have a Rad Toolbar Button that, when clicked, opens a popup.  Is there a way to prevent a user from double clicking?  Currently I can double click the button and it will open two windows.  Thanks.

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 29 Jul 2014, 03:09 AM
Hi Stacy,

Please have a look into the sample code snippet which works fine at my end. Please provide a sample code snippet or try to replicate the issue in the provided code for further help.

ASPX:
<telerik:RadToolBar ID="RadToolBar1" runat="server" OnClientButtonClicked="openWindow">
    <Items>
        <telerik:RadToolBarButton Text="Click">
        </telerik:RadToolBarButton>
    </Items>
</telerik:RadToolBar>
<telerik:RadWindow ID="RadWindow1" runat="server">
</telerik:RadWindow>

JavaScript:
function openWindow(sender, args) {
    $find("<%=RadWindow1.ClientID%>").show();
}

Thanks,
Shinu.
0
Stacy
Top achievements
Rank 1
answered on 29 Jul 2014, 11:24 AM
This wont work in  scenario as not all my toolbarbuttons open windows.  Here's the scenario:

Create a toolbar with a bunch of buttons
For 2 of those buttons, add an onclick function (each button routes thru global.asax to load proper popup page), other buttons use server side stuff.

The many "workarounds" I've seen in this forum wont work because the "onClick" of the button occurs before the "onClientClicked" of the toolbar.

Tags
ToolBar
Asked by
Stacy
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Stacy
Top achievements
Rank 1
Share this question
or