Help
Tuesday, 28th June 2005, 2:50 pmAnyone got any suggestions as to the best way to check for an active internet connection? It needs to run from within a widget, and preferably give me a result I can access with Javascript. Any ideas, email me please!









July 4th, 2005 at 5:31 pm
Hi, I used XMLHttpRequest for my one:
http://www.bbc.co.uk/radio/prototypes/listenlive/
Basically I am making a request to a site, if it comes back then bingo you have a connection. I’m sure there is a better cool way using apple script, I just don’t know it. Hope this helps.
Duncan
July 4th, 2005 at 7:53 pm
That’s a decent idea - and a very sexy widget there Duncan!
July 5th, 2005 at 10:32 pm
Well, I tried that - with a slight modification to only place the buttons if the connection’s actually successful. But - there appears to be a dashboard bug where the html code is reported as “undefined” until you’ve refreshed twice, whether you’re connected or not. which rather screws up the detection routine…