0
Answer

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

Ask a question
Yagnesh Patel

Yagnesh Patel

11y
1.3k
1

<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