Try adding the follow code in your controller

var $components = array('RequestHandler');
function beforeFilter(){
 if($this->RequestHandler->isAjax()){
    Configure::write('debug', 0);// and forget debug messages
    $this->layout = 'ajax'; //or try with $this->layout = '';
 }
}

with this code you can forget setup the debug messages and layout in your
ajax responses, try an tell if work



On 4/22/08, Neveldo <[EMAIL PROTECTED]> wrote:
>
>
> Hi all,
>
> I've an issue with Ajax requests. I'm trying to add Ajax pagination
> for some data by following this tutorial :
> http://bakery.cakephp.org/articles/view/advanced-pagination-1-2.
>
> The pagination works fine but cake loads my entire default layout
> everytime I request a new page !
>
> To resolve it, I add the code bellow in my controller action :
>
>        if($this->RequestHandler->isAjax()) {
>                        $this->render('admin_index', 'ajax');
>        }
>
> and now It load the correct ajax layout but I think I've something
> wront, no ?
>
> thank !
>
> Cordially,
> Neveldo : http://www.neveldo.fr
> >
>


-- 
Axel

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to