You can't redirect from within an AJAX call.

On Feb 1, 1:36 pm, Manolet Gmail <mano...@gmail.com> wrote:
> $this->redirect(array('controller' => 'authors','action'=>'index', 'admin'
> => true));
>
> stilll broken... i think is a cake bug...
>
> On Mon, Feb 1, 2010 at 4:30 PM, ecommy.com <bstdevelopm...@gmail.com> wrote:
> > hmm, maybe try adding the admin url parameter for this->redirect
>
> > On Feb 1, 10:19 pm, Manolet Gmail <mano...@gmail.com> wrote:
> > > Hi.
>
> > > Im sending a form by ajax to /admin/authors/add , the problem is that it
> > > tries to execute for 30 seconds and next give up with an error. The
> > problem
> > > is obviusly is with this line of code:
>
> > > $this->redirect(array('controller' => 'authors','action'=>'index'));
>
> > > on the admin_add method.
>
> > > If i change it with:
>
> > > $this->redirect('/admin/authors/index');
>
> > > The code executes without any problem... i know i can solve in that way,
> > but
> > > i dont understand why this happends just because im sending the form
> > trought
> > > ajax.
>
> > > Thanks in advance.
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > 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<cake-php%2bunsubscr...@googlegroups.com>For
> >  more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Reply via email to