I've also tried requestAction, but that doen't seem to work either. On 16 mrt, 14:42, "gerbenzomp" <[EMAIL PROTECTED]> wrote: > I've created an ajax form, which submits its data to /posts/add/. > > After that I want the ajax call to update a div, showing the view of > the post the user just submitted. The div to be updated should thus > contain the following view: > > /posts/view/id > > I know how I can update the div to display any view by doing the > following in my posts controller: > > if ($this->Post->save($this->data)) > { > $this->render('view_to_display', 'ajax'); > } > > And I know I can get the id of the post by doing: > > $post_id = $this->Post->getLastInsertId(); > > But how can I display the latest post in that div?
--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---