I have the following code which addes a revision. the form is in a div
that gets updated when the form is submitted. The form is submitting
and saving fine and the div is getting updated when finished, but the
problem is, the div is using the default.thtml layout instead of the
ajax.thtml layout like i was expecting. I am using the RequestHandler
component to auto-set the layout. How would i set it to
use the ajax.thtml instead?function add($id) { if(empty($this->data)) { $this->set('task', $this->Reviselog->Task->read(null, $id)); $this->render(); } else { $this->cleanUpFields(); if($this->Reviselog->save($this->data) and $this->Reviselog->Task->save($this->data)) { $this->Session->setFlash('The Revision has been submitted'); $this->redirect('/reviselogs/index/'.$id); } else { $this->Session->setFlash('Please correct errors below.'); $this->set('task', $this->Reviselog->Task->read(null, $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 -~----------~----~----~----~------~----~------~--~--- |
- $this->redirect() after an ajax update Brian French
- Re: $this->redirect() after an ajax update AD7six
- Re: $this->redirect() after an ajax update Brian French
