[Catalyst] Ajax and redirect

fayland fayland at gmail.com
Mon Apr 10 14:02:08 CEST 2006


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

-- 
Fayland Lam // http://www.fayland.org/ 




More information about the Catalyst mailing list