After an Ajax delete I want to refresh the div.
The delete is OK but the refresh is made with empty content. What am I
doing wrong ? Have you some debug tips ?
I don't really know how to track back things with Ajax....
//view index.thtml
<div id='slideshows_table'>
......
<?php echo
$ajax->link('Delete','/slideshows/delete/'.$slideshow['Slideshow']['id'],
array('update'=>"slideshows_table")) ?>
.......
</div>
//the delete method in the slideshows controller:
function delete($id)
{
if ($this->Slideshow->del($id)){
$this->set('data', $this->Slideshow->findAll());
$this->render('ajax_index', 'ajax');
}
}
And I have an ajax_index.thml file in views/slideshows/.
olivvv
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---