Posted on 31 July 2009 by Anish MM | Visited 4517 times, 4 so far today
Client side Validation with FCK Editor
RequiredFieldValidator is not work with FCK editor but CustomValidator will work with FCK editor.
:FCKeditor ID=”txtBody” Width=”660px” Height=”360px” runat=”server” ToolbarSet=”MyToolbar” BasePath=”~/FCKEditor/” />
:CustomValidator runat=”server” ID=”CustomValidator2″ SetFocusOnError=”true” ValidationGroup=”cate” Display=”Dynamic” ErrorMessage=”The Page body is not filled” ClientValidationFunction=”ValidateContentText” Text=”*” />
function ValidateContentText(source, args) {
var fckBody = FCKeditorAPI.GetInstance(
‘’);
args.IsValid = fckBody.GetXHTML(
true) !=
“”;
}
September 14th, 2009 at 7:20 am
Thank you much for this great blog post.