Hi, I have a RadButton that is supposed to open a radwindow when the "OnClientClicked" is fired. However, the first time this gets fired, nothing happens. The second time I click on the button...the radwindow opens up. Am I missing some code? I am basing this on your demo: http://demos.telerik.com/aspnet-ajax/button/examples/slideshow/defaultcs.aspx.
Here is the code that I have:
I can use a plain old button, and it fires off without a second click, but I would really like to use the radbutton since that will keep my styling the same.
Thanks!
Here is the code that I have:
<telerik:RadCodeBlock ID="rcb1" runat="server"> <script type="text/javascript"> function ShowInsertForm() { var combo = $find("<%= RadComboBox1.ClientID %>"); var comboItem = combo.get_selectedItem(); if (!comboItem) { window.radopen("AddComment.aspx", "UserListDialog"); } else { var string = comboItem.get_text(); window.radopen("AddComment.aspx?ID=" + comboItem.get_value(), "UserListDialog"); } return false; } </script> </telerik:RadCodeBlock><telerik:RadButton ID="AddComment" runat="server" AutoPostBack="false" Text="Add Comment" CommandName="Right" OnClientClicked="ShowInsertForm"> </telerik:RadButton> <telerik:RadButton runat="server" ID="btnUpdate" Skin="WebBlue" Text="Update Recipient"></telerik:RadButton> </div> </telerik:RadAjaxPanel> <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true" Skin="WebBlue"> <Windows> <telerik:RadWindow ID="UserListDialog" runat="server" Title="Add Comment" Width="755px" Height="460px" ReloadOnShow="true" ShowContentDuringLoad="false" Modal="true" /> </Windows> </telerik:RadWindowManager>I can use a plain old button, and it fires off without a second click, but I would really like to use the radbutton since that will keep my styling the same.
Thanks!