function WebForm_OnSubmit()
{
for ( var i = 0; i < parent.frames.length; ++i ) if ( parent.frames[i].FCK ) parent.frames[i].FCK.UpdateLinkedField(); (function() { var editor = FCKeditorAPI.GetInstance('master_Content1_fckEditor1'); if (editor) editor.UpdateLinkedField(); })(); return true; }
{
for ( var i = 0; i < parent.frames.length; ++i ) if ( parent.frames[i].FCK ) parent.frames[i].FCK.UpdateLinkedField(); (function() { var editor = FCKeditorAPI.GetInstance('master_Content1_fckEditor1'); if (editor) editor.UpdateLinkedField(); })(); return true; }
But problem is that, if we have multiple number of FCK Editor, then we have to register all FCK Editor. To solve this issue, I discovered a simple C# code, which will find all FCK Editor present inside Update Panel & register them all automatically.
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
FCKEditor();
}
}
private void FCKEditor()
{
this.Page.ClientScript.RegisterOnSubmitStatement(this.GetType(), "AjaxHack", "for ( var i = 0; i < parent.frames.length; ++i ) if ( parent.frames[i].FCK ) parent.frames[i].FCK.UpdateLinkedField();"); }
{
if (!IsPostBack)
{
FCKEditor();
}
}
private void FCKEditor()
{
this.Page.ClientScript.RegisterOnSubmitStatement(this.GetType(), "AjaxHack", "for ( var i = 0; i < parent.frames.length; ++i ) if ( parent.frames[i].FCK ) parent.frames[i].FCK.UpdateLinkedField();"); }
Happy coding!!!