On Jul 27, 2007, at 4:49 PM, Aparajita Fishman wrote:

What I do is return the text "###timeout###" when an Ajax request results in a session timeout, instead of redirecting to app.timeout. In my Javascript Ajax response handler I look for that string in transport.responseText and if I find it I set window.location to the app.timeout url, which redirects to top level page to the right place.

That answers the second part well, but how do you first know it is an Ajax request? By setting an extra header?

If it's fusebox, I always prefix my Ajax fusebox actions with ajax_, so I just look for that. Otherwise, depending on the framework you are using (prototype, jquery, etc.), it may already set a header for you. If you are rolling your own, add a header in the request.

Thanks to all for the many helpful replies.

--
Bart _______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to