Jan Prill
2005-Oct-27 19:13 UTC
fckeditor_text_field won''t get submitted by form_remote_tag
Hi all, has someone succeeded in submitting a form build by the form_remote_tag including a fckeditor_text_field? I''ve followed the instructions of http://www.joshuamcharles.com/rails/fckeditor.html and in a ''ajax-less'' page flow it''s working like a charm. Unfortunatly after using the FCK-field with the ajax helper form_remote_tag the content of the FCK-field won''t get submitted resulting in :description => "" (description is the field i''m using the FCK on). Changing the fckeditor_text_field back to a normal textarea makes things work again regardless of using start_form_tag or form_remote_tag. Has anyone experienced this behaviour or has a snippet of a ajax-submit including a FCK-field? kind regards Jan Prill
Josh Charles
2005-Oct-27 19:49 UTC
Re: fckeditor_text_field won''t get submitted by form_remote_tag
On 10/27/05, Jan Prill <JanPrill-sTn/vYlS8ieELgA04lAiVw@public.gmane.org> wrote:> Hi all, > > has someone succeeded in submitting a form build by the form_remote_tag > including a fckeditor_text_field? >Hello, I''m curious as to two things. First, how is the fck-editor being loaded (i.e. through an ajax call or with the page). If it''s through an ajax call, is the editor loading? I''m not sure exactly how the fckeditor changes the DOM of the page, so that might be why the ajax call is not working while the regular sumbit does. If it is a DOM problem, I''m sure there is a way around it, but it would probably require writing some custom javascript. You might also try posting in the fck_editor forums and see if anyone over there is using an ajax post. Josh
Jan Prill
2005-Oct-28 06:34 UTC
Re: fckeditor_text_field won''t get submitted by form_remote_tag
Hello,>I''m curious as to two things. First, how is the fck-editor being >loaded (i.e. through an ajax call or with the page). If it''s through >an ajax call, is the editor loading? > >The fckeditor is loading with the page. I''ts only the post that I want to be ''ajaxish''.>I''m not sure exactly how the fckeditor changes the DOM of the page, so >that might be why the ajax call is not working while the regular >sumbit does. If it is a DOM problem, I''m sure there is a way around >it, but it would probably require writing some custom javascript. > >The helper method fckeditor_text_field replaces the initial textarea with the following call: <p><label for="product_description">Description</label><br/> <textarea cols="40" id="product_description" name="product[description]" rows="20"></textarea><script type="text/javascript"> //<![CDATA[ var oFCKeditor = new FCKeditor(''product_description'');oFCKeditor.ReplaceTextarea() //]]> </script></p> Do you think, that this replacement of the textarea with the fckfield might cause the problems with form_remote_tag while a ''normal'' post is working? On this mailing list someone has had problems with mozilla and changed the helper, so that id and name of the textarea are equal. I''ve tested this too but :description => stays empty. I haven''t thought this would be my problem anyway since the form_remote_tag post isn''t working on IE either. regards Jan Prill>You might also try posting in the fck_editor forums and see if anyone >over there is using an ajax post. > >Josh > > >