fckEditor inside UpdatePanel broken in VS2008 beta2

Looking for help? Ready to help? That's the place to go.

fckEditor inside UpdatePanel broken in VS2008 beta2

Postby nimad » Sun Aug 05, 2007 4:52 pm

When placing an fckEditor inside an UpdatePanel, upon submitting to the server, the content of the fckEditor gets cleared. This has been a known issue prior to Vs2008 Beta2. The solution is documented here:
http://jlcoady.net/archive/2007/03/30/f ... pdatepanel
here:
http://wiki.fckeditor.net/Troubleshooti ... 0a41253d76
and here in the forums:

http://forums.asp.net/p/1028530/1513800.aspx#1513800

So using VS2008 Beta1, I used

function FCKUpdateLinkedField(id)
{
try
{
if(typeof(FCKeditorAPI) == "object")
{
FCKeditorAPI.GetInstance(id).UpdateLinkedField();
}
}
catch(err)
{
}
}
and everything worked fine.

I upgraded to VS2008 Beta2, here Microsoft Ajax Library is included in the framework.

Now I get an exception thrown everytime I try to submit my form. The xmlHttpRequest has a status code of 500 with a status text of "Interenal Server Error"

Do you know what is going on, and more importantly, how to fix it?

Thanks!
nimad
 
Posts: 5
Joined: Thu Jul 19, 2007 5:34 pm

Re: fckEditor inside UpdatePanel broken in VS2008 beta2

Postby attiks » Sun Aug 26, 2007 10:45 am

Hi,

Found a work-around for this using VS2008/B2 (target still is .Net 2.0), based on information found in (http://forums.asp.net/p/1028530/1406390.aspx#1406390)

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Me.ClientScript.RegisterOnSubmitStatement(Me.GetType, "AjaxHack", "for ( var i = 0; i < parent.frames.length; ++i ) if ( parent.frames[i].FCK ) parent.frames[i].FCK.UpdateLinkedField();")

End Sub

Hope it helps ;-)
attiks
 
Posts: 1
Joined: Sun Aug 26, 2007 10:42 am

Re: fckEditor inside UpdatePanel broken in VS2008 beta2

Postby nimad » Wed Sep 26, 2007 2:53 am

Thanks! This works great!
nimad
 
Posts: 5
Joined: Thu Jul 19, 2007 5:34 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 4 guests