Hey Dan,

      You know, I can't even count how many times a lingering modal
has locked an ajax application that I've been using or working on.
Every other request worked fine, but for some reason this one is lost
in space, who knows where those packets have gone, and at this point
who cares.  A respectable recovery would be ideal, but in many cases
the application is "locked" during these load times, so not only has
your request failed, but now your client is compromised.  I've
implemented some things to get around this idea, but for some reason
reading your post got me motivated to do some serious monkey
patching.  Its a pretty cool idea and I've got it working really well,
only a minimal amount of refactoring was necessary, it wasn't even
half as hard as i expected and wrote the code and did testing this
afternoon.  For my basic examples it worked fine.  Some behind the
scenes stuff you may need to know in my example is that the
responder.php script is just executing "sleep(delay)" delay being the
variable that you send it.  Also as with most of my "examples" you
gotta read the code and look at your console in firebug to see whats
actually going on.

The example
http://positionabsolute.net/projects/javascript/AjaxTimeout/

My monkey patched version of proto 1.6
http://positionabsolute.net/includes/javascripts/prototype1.6.js



--
Matt Foster
Ajax Engineer
Nth Penguin, LLC
http://www.nthpenguin.com

On Jun 26, 2:37 pm, Dan Delaney <[EMAIL PROTECTED]> wrote:
> Has anyone discussed adding an "onTimeout" option for Ajax.Request?
> That would be incredibly useful. Something like this would be great:
>
> new Ajax.Request('/someurl', { onSuccess: doSomething, timeoutDelay:
> 10000, onTimeout: doSomethingElse });
>
> timeoutDelay, of course, is milliseconds, as in the
> window.setTimeout() method.
>
> Cheers
> --Dan
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-spinoffs@googlegroups.com
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