Hi All,
I am having some issues with FCK Value property.
I am using ASP.NET 2.0 and Ajax.
I have the need to save the FCK editor values on an event from elswhere on the page.
If I enter some text into the fck editor and then submit the update panel, the value is not present in the control
i.e. FCKeditor1.Value is always "";
If I manually set the value in code, FCKeditor1.Value ="Testing 123";, it shows in the editor.
If I change the value and submit hte update panel, the value shown is still ="Testing 123".
How can I persist the text entered into the editor for the postback.
Also, The Save button commits a full page update, is there anyway that this can only execute a callback for the update panel?
Many thanks for you assistance,
Rod
I am having some issues with FCK Value property.
I am using ASP.NET 2.0 and Ajax.
I have the need to save the FCK editor values on an event from elswhere on the page.
If I enter some text into the fck editor and then submit the update panel, the value is not present in the control
i.e. FCKeditor1.Value is always "";
If I manually set the value in code, FCKeditor1.Value ="Testing 123";, it shows in the editor.
If I change the value and submit hte update panel, the value shown is still ="Testing 123".
How can I persist the text entered into the editor for the postback.
Also, The Save button commits a full page update, is there anyway that this can only execute a callback for the update panel?
Many thanks for you assistance,
Rod
Re: Value missing
Typically, as soon as posting the solution materializes.
Many thanks to Dave Parslow's ASP.NET Blog
http://www.daveparslow.com/2007/10/fcke ... roken.html
Re: Value missing
I've just been searching through the posts made about using the FCKEditor within an ASP.NET UpdatePanel, and understand there are various problems, issues, solutions.
However, as far as I've tested... (and that is only a handful of the multitude of options in the editor, and b.t.w. the version is 2.4.3) that if you register the editor as a postback trigger within the updatepanel, the editor retains it's value. For example:
I know this defeats the purpose of asynchronous callbacks, and the amount of data posted back to the server, but it's a solution that works for me.
)
(I just hope this holds true during extensive testing
Re: Value missing
HI I have battled with the same problem for weeks now. Finally the solution is there. You need to apply these lines of code to your submit function,
http://blogs.uct.ac.za/blog/lovemores-world/2008/10/27/post-fckeditor-form-with-ajax-solved
Log any more problems on my blog so that I can help you quickly.
Happy coding!
Re: Value missing
Here is the actually C# code that rodmcleay posted a link to :
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();"
);
This works great for me, simply add it to the the Page_Load.
Kudos to the original author Dave Parslow : http://www.daveparslow.com/2007/10/fckeditor-inside-updatepanel-broken.html