Hi, usually I would use a form like this one echo $ajax->form('edit', 'post', array( 'model' => 'model', 'url' => array( 'action' => 'edit'), 'update' => 'element_to_update', ));
but what if, depending on the success of the edit operation, I want to update another div? For example I would like to update the element 'form_div' when there is a validation error when saving the record and the element 'listing_div' when the record was saved successfully and I want to relfect the changes in the part of my pages that shows info about the data set that has just been updated. What do I put in my controllers and in the views? what do I have to fill in here and what has to go in the views? if ($this->Model->save($this->data)) { //some code that will render a view which will update 'listing_div' } else { //some code that will render a view which will update 'form_div' } I tried to google for this but didn't really find anything. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---