Yagnesh Patel

Yagnesh Patel

  • NA
  • 1
  • 1.9k

Fck editor required validation in asp.net C# for Google chro

Jun 8 2013 4:53 AM

<script type="text/javascript">
    function ValidateContentText(source, args) {
        var fckBody1 = FCKeditorAPI.GetInstance('<%=txtproduct_detail.ClientID%>');
        args.IsValid = fckBody1.GetXHTML(true) != "";
    }
    </script>


 <FCKeditorV2:FCKeditor ID="txtproduct_detail" runat="server" Height="300">
                                            </FCKeditorV2:FCKeditor>
                                             <asp:CustomValidator runat="server" ID="CustomValidator2" ControlToValidate="txtproduct_detail"
                                                SetFocusOnError="true" Display="dynamic" ErrorMessage="*" ClientValidationFunction="ValidateContentText"
                                                ValidateEmptyText="true"></asp:CustomValidator>

i used this code, it work in Firefox but not in google Chrome
please help me