Hi Brian, thanks for your reply. I tried the jquery tutorial and I like that solution with replacing href "onfly". So I believe the jquery will be working but I don't wont to mix to much frameworks inside my app. I already use prototype.
Thanks for help. Tomas On May 4, 6:15 pm, brian <bally.z...@gmail.com> wrote: > I can't tell you anything specific because I use jQuery (and so avoid > Cake's AjaxHelper) buthave you looked at these? > > http://book.cakephp.org/view/167/AJAX-Paginationhttp://bakery.cakephp.org/articles/view/advanced-pagination-1-2 > > And if you prefer jQuery over > Prototype:http://bakery.cakephp.org/articles/view/easy-ajax-pagination-using-jq... > > On Mon, May 4, 2009 at 7:31 AM, toka...@gmail.com <toka...@gmail.com> wrote: > > > Hi :), I am trying to switch two elements within controller. The main > > idea of this is to have different table layout for NEW posts and > > another one for APPROVED, DELETED posts. So i use elements that are > > just having different table structure. > > > I am detecting ajax call with 'isAjax' to render one of two elements > > OR the whole layout. BUT it is behaving in very strange way. > > > The PROBLEM is ... that ajax call is not well recognized TOGETHER with > > PAGINATOR. For first display of element with isAjax it works great, > > but if I go on next PAGES 2,3,4, ... Paginator then renders those > > links with normal html 'a href' witout ajax link. Then of course it > > does not recognize ajax call and automaticaly displays the default > > page. > > > ------- > > View: > > <?php echo $this->element('draw_posts',array('data'=>$data)); ?> > > > Controller: > > Switching of elements within controller. > > > if($this->RequestHandler->isAjax()) { > > //1 = New posts > > if ($FilterBy_Status == '1') { > > $this->render('/elements/draw_posts','ajax'); > > } else { > > //switch for the rest of posts like Deleted, > > Certified, Hidden > > > > $this->render('/elements/draw_filtered_posts','ajax'); > > } > > } > > > For me it seems as a bug, but I am a Cake beginer so first asking > > you :) > > > Any help appreciated!! > > Thanks > > Tomas --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---