Make sure the spaces are not in your source files (before or after the
php tags) as these spaces will be added to the ajax response.

On Feb 28, 10:13 am, "dhalsim" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've put an ajax editor in my view and the problem I have is when I
> edit my field for the second or more time, the value in the text field
> is prefixed with sereval tabulation (I don't see directly the value in
> the input). I don't understand where they come from.
>
> this is a piece of my view :
> <td class='info'>
>   <p id="ajax_edit_nom"><?php echo $user['nom']; ?></p>
> </td>
> <?php echo $ajax->editor('ajax_edit_nom','/utilisateurs/ajax_update/'.
> $user['utilisateurid'].'/nom')); ?>
>
> and my UtilisateursController with the ajax_update() method :
>
> function ajax_update($id,$sub)
>         {
>                 $value = $this->params['form']['value']; //new value
> to save
>
>                 $this->Utilisateur->id = $id;
>                 if (!$this->Utilisateur->saveField($sub, $value,
> true))
>                 {
>                         $this->set('error', true);
>                 }
>                 $user = $this->Utilisateur->read(array($sub), $id);
>                 $this->set('value',$user['Utilisateur'][$sub]);
>                 $this->layout = 'ajax';
>         }
>
> and finally th ajax_update.thtml
> <?php e($value);?>
>
> If anybody has an idea...


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

Reply via email to