tags:

views:

206

answers:

2

Hi,

in my application am calling this line in case a particular case (if condition) from ajax call

$this->redirect('/login/login/');

But this was updating the particular div. I want to redirect the whole page. How to do it?

Thanks,

+1  A: 

you may need to do it the old way :)

window.opener.location.href = "new page";
Brian
A: 

I believe that you can supply a parameter to redirect which will change the controller.

In an application I have written I use:

$this->redirect(array('controller' => 'users', 'action' => 'login');

when I want to prompt the user for a login.

You can find the full documentation for redirect here

http://book.cakephp.org/view/425/redirect

Felix