On Apr 11, 7:44 am, Tom Gregory <[EMAIL PROTECTED]> wrote:
> What I'm saying is the browser performs the redirect automatically--
> so your AJAX object won't see the 302 (et al) header in its status.
> It will see whatever status code from the page it redirected to--in
> your case, probably 200.
>
> Yes, it will get whatever response the redirect target provides
> (login, in this case), but you have no programatic way (to my
> knowledge) of determining a redirect occurred without parsing the
> result for values you know your application should return.
>
> And as to your question in your other email: Force a page refresh/
> redirect by changing document.location.href. It's standard
> Javascript; search Google for some good examples.
>
> To modify the example from the Prototype docs:
> new Ajax.Updater('items', '/items', {
> parameters: { text: $F('text') },
> insertion: Insertion.Bottom,
> on403: function (transport) { // <== new handler
> // Authentication timeout; redirect
> document.location.href = newUrl;
> }
>
> });
>
I am finally getting around to fixing this issue. The problem is that
Ajax.Autocompleter (script.aculo.us) does not seem to have either
onFailure or on302 handlers. Any suggestions? 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
-~----------~----~----~----~------~----~------~--~---