Thanks Dave for your answer. I hope to not make a special view to render the element's results. I hope that there is a method to escape this
On Mar 15, 8:12 pm, "Dave Maharaj :: WidePixels.com" <d...@widepixels.com> wrote: > I think I know what you mean. > > What I do (no expert so I may be doing it wrong) but for example > 1. I render element view_posts for the original view of what the visitor > will see. > 2. I have an edit button which calls a form to update the div where > view_posts currently is with a view called edit-post > 3. In edit_post its simply an AJAX form, do what you need to do....click > Save which then in the controller the save function I have > ..... > $this->set(compact('programs')); > $this->render('/elements/posts/view_posts'); > ....... > > So you need 2 views... The pre-edited view, then the edit view or whatever > you need then return back to the original pre-edited view after save with > the new info. > > Hope that helps. > > -----Original Message----- > From: byqsri [mailto:marco.rizze...@gmail.com] > Sent: March-15-09 3:30 PM > To: CakePHP > Subject: Re: Ajax reload of an element. > > Sorry but perhaps I have not explained well. > I have a div, inside a div I render a element (with params). > I have a link and I would that when I click the link the ajax helper reload > inside the div the element. > > <div id="posts"> > <? > echo $this->renderElement( > 'postsList', > array(.....) > ); > ?> > </div> > <?php echo $ajax->link( > ...... > array( 'update' => 'posts' ) > ); > ?> > How must I configure the $ajax->link to re-render the Element? > > On Mar 15, 6:41 pm, "dr. Hannibal Lecter" <lecter...@gmail.com> wrote: > > Did you go through the AJAX helper chapter in the good book? > > >http://book.cakephp.org/view/212/Methods > > > On Mar 15, 10:25 am, "marco.rizze...@gmail.com" > > > <marco.rizze...@gmail.com> wrote: > > > Hi > > > I have a page where I have an element (with params) that is a list > > > of items. > > > Now I would that when user click on a certain button the element is > > > reload . > > > I would make this with ajax. > > > How can I do the ajax reload of an element? > > > Many thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---