Recent Widgets


Register for DashboardWidgets

Recent Forums Posts

Partners


iCompositions

MacDesktops.net

RSS Showcase
RSS Comments
RSS Forums

This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. Posted in: Widget Development

Check if internet connection is present

Author Message
RossOliver



Joined: 11 Jun 2007
Posts: 2

Posted: Tue Jun 26, 2007 - 8:00 am    Post subject: Check if internet connection is present Reply with quote

My widget uses the internet every 30 seconds or so when it's in use and the dashboard is up...

If there is no internet connection present it has a fit - is there any function I can use to check if the internet is connected before I try and use it?

Thanks for your time,

-Ross
View user's profile Send private message Send e-mail Widgets
jonr



Joined: 24 Jun 2007
Posts: 1

Posted: Fri Jul 06, 2007 - 2:46 am    Post subject: Reply with quote

I don't know if this works but a quick google search revealed a javascript. I altered it a bit for your scenerio.

<img src="/some-nonexistant-path-on-your-server/fake.gif" onError="my-function()">

Though I'm not certain how well this would work with dashcode. Dashcode seems to have a few issues as widget generated with dashcode do not render in safari. Reversely, it seems impossible to edit a widget that was created in dashcode.
View user's profile Send private message Send e-mail Widgets
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

 
Powered by phpBB © 2001, 2002 phpBB Group