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-Pagination http://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-jquery On Mon, May 4, 2009 at 7:31 AM, [email protected] <[email protected]> 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 [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?hl=en -~----------~----~----~----~------~----~------~--~---
