Categorized | Asp.net

Client side Validation with FCK Editor ,Asp.Net

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) != “”;
}

1 Comments For This Post

  1. mcdonalds coupon Says:

    Thank you much for this great blog post.

Leave a Reply


rss_32 twitter_32 facebook_32 linkedin_32 stumbleupon_32 friendfeed_32 google_32
  • Popular
  • Latest
  • Comments
  • Tags
  • Subscribe
  • Stay up to date

  • Subscribe to the RSS Feed
  • Subscribe to the feed via email

45,549
Unique
Visitors
Powered By Google Analytics
Facebook Like Button for Dummies