let's see if this works for you:

In the view:
----------------
        <td>Email:</td>
        <td><p id="ajax_edit_email"><? echo $post['Post']['email'] ?></p></td>
        <?php echo $ajax->editor('ajax_edit_email',
'/posts/ajax_update_email/' . $serial_number['Post']['id']) ?>

'ajax_edit_email' -> id to update
'/posts/ajax_update_email/' . $serial_number['Post']['id'] -> url that
calls the action

within the action:
------------------------
function ajax_update_email($id)
        {
                $email = $this->params['form']['value']; //new value to save

                $this->SerialNumber->id = $id;
                if (!$this->SerialNumber->saveField('email', $email, true))
                {
                        $this->set('error', true);
                }

                $this->set('serial_number', $this->Post->read(null, $id));

                $this->layout = 'ajax';
        }

In the ajax view (ajax_update_email.thtml)
------------------------------------------------------------
echo $post['Post']['email']


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to