[Catalyst] Ajax and redirect
J. Shirley
jshirley at gmail.com
Mon Apr 10 15:23:13 CEST 2006
I would say this is most likely a bug/issue with Ajax.Updater. If it
has a sort of preload function (I've not used it) that grants you
access to the header you could check there for the status code and
then redirect appropriately.
-J
On 4/10/06, Andreas Marienborg <omega at palle.net> wrote:
>
> On 10. apr. 2006, at 14.02, fayland wrote:
>
> >> Generally, I think JavaScript refreshes are done with:
> >> window.location( url );
> >
> > I tried it, and unfortunately it doesn't work. my code as follows:
> >
> > unless ($c->user_exists) {
> > $c->res->body(<<HTML);
> > <script>
> > top.location = '/login';
> > </script>
> > HTML
> > $c->log->debug('11111111111111');
> > }
> >
> > obviously, 1111111 is printed, but the page doesn't redirect. and
> > any other tips?
>
>
> the interesting is what your browser does. If you use prototype, you
> need to do the ajax-call wit evalScripts set to a true value, if not,
> the <script> tags will not be loaded as javascript.
>
>
> andreas
>
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>
More information about the Catalyst
mailing list