Referring to the attached code for my usercontrol, the comments dialog (tooltip) pops up fine and saves fine if I do not use any validators or set the save button to causesValidation="false"
If I add one or more validators (all but 1 commented out), the validation fires if I leave the field blank but if I enter text, I dont get any validation errors but the onclick doesnt fire.
Any ideas?
If I add one or more validators (all but 1 commented out), the validation fires if I leave the field blank but if I enter text, I dont get any validation errors but the onclick doesnt fire.
Any ideas?
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="ctrlDealRatings.ascx.vb" Inherits="DealNutWebsite.ctrlDealRatings" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script type="text/javascript" id="telerikClientEvents1"> //<![CDATA[ function OnClientRated(controlRating, args) { var tooltip = $find("<%=RadToolTip1.ClientID %>"); tooltip.show(); } function HideTooltip(controlRating, args) { var tooltip = $find("<%=RadToolTip1.ClientID %>"); tooltip.hide(); return (false); } //]]> </script></telerik:RadCodeBlock><div id="DealRatingDiv" runat="server" visible="true" style="position:relative;top:0px;width:200px;border:0px solid red"> <asp:Label class="CaptionSm" ID="lblCaption" runat="server" Text="Click a Nut to Rate:" style="float:left; margin-top: 6px"></asp:Label> <div style="float:left; margin-top: 0px"> <telerik:RadRating ID="RadDealRating" runat="server" Skin="MyCustomSkin" AutoPostBack="false" readonly="true" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false" OnClientRated="OnClientRated" Precision="half" /> </div></div><p></p><telerik:RadToolTip ID="RadToolTip1" runat="server" ShowEvent="FromCode" HideEvent="FromCode" TargetControlID="RadDealRating" AutoCloseDelay="1000" ShowCallout="true" Position="MiddleLeft" Width="275px" Animation="Resize" ManualClose="True" Height="300px" > <div class="AddDealRatingbox"> <asp:Image ID="Image1" runat="server" ImageUrl="/Images/RateThisDeal.png" /> <br /> <asp:Label ID="lblName" runat="server" Text="Name:"></asp:Label> <br /> <asp:TextBox ID="txtName" runat="server" style="width:260px" /> <%-- <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" CssClass="Errors" ControlToValidate="txtName" ErrorMessage="Your name is required" SetFocusOnError="True" >Your name is required</asp:RequiredFieldValidator> <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtName" ErrorMessage="Please use plain text only" Text="Please use plain text only" CssClass="Errors" ValidationExpression="[^<]+" SetFocusOnError="True" /> --%> <br /> <br /> <asp:Label ID="lblInstructions" runat="server" Text="Your feedback:"></asp:Label> <br /> <asp:TextBox ID="txtComments" runat="server" TextMode="MultiLine" Rows="5" Columns="30" style="width:260px" /> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ValidationGroup="save" CssClass="Errors" ControlToValidate="txtComments" ErrorMessage="Your comment is required" EnableViewState="False" ViewStateMode="Disabled" >Your comment is required</asp:RequiredFieldValidator> <%-- <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtComments" ErrorMessage="Please use plain text only" text="Please use plain text only" CssClass="Errors" ValidationExpression="[^<]+" SetFocusOnError="True" /> --%> <br /><br /> <asp:ImageButton ID="btnPostComment" runat="server" Style="outline:0; cursor:pointer" ValidationGroup="save" ImageUrl="~/Images/btnPostComment.png" OnClick="btnPostComment_Click" CausesValidation="True" /> <asp:ImageButton ID="btnCancel" UseSubmitBehavior="false" runat="server" Style="margin-left:12px; outline:0; cursor:pointer" OnClientClick="HideTooltip()" ImageUrl="~/Images/btnCancel.png" /> </div></telerik:RadToolTip>