With the ajax->form you are writting an ajax call. You can pass some
parameters, but the most important are the function "Post/add" and the
div to update.

In the add action you have to save the new data, to do a new query to
get the new data and then render an ajax view ($this->layout = 'ajax';)

The ajax view could be like:

<? echo $ajax->div('div_id'); ?>
  <?php foreach ($posts as $row): ?>
    <tr>
        <td><?php echo $row['Post']['title'] ?></td>
        <td><?php echo $row['Post']['author'] ?></td>
      <td>
                <?php echo $html->link('View','/admin/serial_numbers/view/' .
$row['SerialNumber']['id'])?>
                    <?php echo $html->link('Edit','/admin/serial_numbers/edit/' 
.
$row['SerialNumber']['id'])?>
                <?php echo $html->link('Delete','/admin/serial_numbers/delete/' 
.
$row['SerialNumber']['id'])?>
        </td>
    </tr>
  <?php endforeach?>
<? echo $ajax->divEnd('div_id'); ?>


--~--~---------~--~----~------------~-------~--~----~
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