[Catalyst] Ajax and redirect

A. Pagaltzis pagaltzis at gmx.de
Mon Apr 10 14:04:14 CEST 2006


* fayland <fayland at gmail.com> [2006-04-10 10:35]:
> It seems that redirect doesn't work with Ajax, the reason might
> be Ajax just update a "div" and div cann't recieve the header:
> Location stuff. There is any way to get out?

Not all implementations of XMLHttpRequest follow redirects
automatically, but XMLHttpRequest most definitely *can* receive
this header just fine. You can check the `status` property to see
if the response was a redirect, and use the `getResponseHeader`
method to read the `Location` header. The question is whether
your AJAX JS framework does that by itself; apparently not.


> use "meta refresh" instead "redirect"?

That is even less likely to work.


* Carl Franks <fireartist at gmail.com> [2006-04-10 11:55]:
> Generally, I think JavaScript refreshes are done with:
> window.location( url );

You missed the point entirely, I’m afraid.


Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>



More information about the Catalyst mailing list