Don't know what you're sever side environment is, but if you explicitly 
create and HTTP status code other than 200 (or any in the 200's) the 
prototype Ajax objects will call their onFailure function.  So, in PHP 
you could do this:

    header("HTTP/1.0 403 Forbidden");

And, on the client side, the Ajax object would fire the onFailure 
routine which could then be used to repaint the screen or force a 
re-login or whatever.

 -- Dash --

grigora wrote:
> Hi,
>
> To handle authentication, my system checks for the user's credentials
> (cookie) and if the login has expired, redirects the user to a login
> page. This works fine except when the user is on a page that has an
> autocomplete text box and starts typing into the box.
> I am wondering if there is a way to detect that the server has
> returned a redirect and tell Ajax.Autocompleter to repaint the whole
> screen.
>
> Thanks.
>
>
> >
>
>   

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to