Hi!

I had a similar problem when dealing with rich text and ajax. Have a
look at my form_remote_tag. I think the before parameter calling
tinyMCE.triggerSave() is required.

I needed the calls after completion ('complete') if the validation
fails and the form needs to be displayed again. Otherwise, the
textarea wasn't a richt ext area any more.

<?php echo form_remote_tag(array(
  'url'     => 'comment/add',
  'update'  => array('success' => 'added_comment', 'failure' =>
'add_comment'),
  'script'  => true,
  'before' => 'tinyMCE.triggerSave()',
  'loading' => "Element.show('indicator')",
  'success' =>
"Element.hide('indicator');Element.show('added_comment');Element.hide('add_comment');",
  'failure' => "Element.hide('indicator');",
  'complete'=>
"tinyMCE.idCounter=0;tinyMCE.execCommand('mceAddControl', true,
'user_comment');"
        ),array(
  'name'        => 'form1'
        )) ?>


Erik

On 2 Nov., 16:59, ebreeze <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have an ajax form which contains a textarea:
>
>                 <?php echo form_tag('@community/forumpost_add', array(
>                   'id'        => 'sf_admin_edit_form',
>                   'name'      => 'sf_admin_edit_form',
>                 )) ?>
> [....]
>                 <?php echo textarea_tag('post[description]', 
> $sf_params->get('post[description]'), ' rich=true') ?><br />
>
> [....]
>                 <?php echo submit_to_remote('ajax_submit', 'Post', 
> array('update'
> => 'forumpost_area', 'url'      => '@forumpost_add_ajax', 'loading'
> => "Element.show('indicator')", 'complete' =>
> "Element.hide('indicator')", )) ?>
>
> Everything works fine without the using the 'rich=true' attribute.
> However, when I put 'rich=true' (using Tinymce) the posted textarea
> value is blank. Obviously it is not posted at all.
>
> Using Tinymce for normal (nonajax) forms for me works fine. Using ajax
> forms on its own without rich text areas works as well. It is only the
> combination of rich text area and ajax form that causes the issue.
>
> Probably there is a work around - can anyone tell me how to get hold
> of the value of the rich textarea in this ajax form?
>
> Thanks:
>
> Milena


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to