On Mar 3, 11:43 pm, Maricel <[email protected]> wrote:

> I have a Google Gadget that reads remote content and displays it, is
> there any way (or a Gadget API) to determine if the Internet
> connection exists so I can display an appropriate error message?

There's no explicit function to do this, but it looks like the content
retrieval functions (_IG_FetchXmlContent, etc.) return a JS null for
their data parameters when an error occurs, including no connection.
So you'd code it something like this:

_IG_FetchXmlContent(url, callback);

function callback(xml)
{
  if (xml == null)
  {
    // No connection
  }
  else
  {
    // Retrieved OK
  }
};


HTH,

String


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iGoogle Developer Forum" 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/Google-Gadgets-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to