I have a PeriodicalUpdater that refreshes the contents of a div. If the user's internet connection (or the remote server) goes down, I'd like to change its contents to some message alerting them to the problem.
My first thought was that this would be covered by the onFailure handler. But that's not universally the case. In Firefox, Webkit and Opera, the onSuccess handler is called with a status of zero. In IE7, the onFailure handler is called with a status of <insert large and gradually incrementing number here>. What's the right way to do this? Then, once I've caught the failure, is there a way to get a reference to the PeriodicalUpdater's div from within a handler, so I can update it with my message? I know Prototype provides a way to direct failure output to a different div. But in this case there is no failure output; I'm providing my own message. I can think of a couple of ways to hack around this using a curried function or a global variable, but I'm wondering if there's a cleaner solution. Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" 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/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---
