I'm using the follwiong script provided by the the Google Gears FAQs:

http://code.google.com/apis/gears/gears_faq.html#isOnlineFunction

in my application to check whether the user is "online" or "offline".

When online, this works fine, ping count increases and server status
reads "Server Accessible".

When I turn the browser (Firefox 3) to "Work Offline" mode, it also
works as expected, ping count increases and status reads "Server
Inaccessible".

However, when I just cut off the connection (e.g.) pull the network
plug, both the ping count and server status stop changing (i.e. they
continue to read whatver they were before I pulled the plug) and
firebug shows the following 2 errors:

Request is not loading or done.
[Break on this error] if(request.responseText != "" &&...xt.indexOf
("404 Page not found") == -1){

Request is already open.
[Break on this error] request.open('GET', resource_to_test);

Obviously I would like to resolve these Javascript error and for the
script to work in the same way as it does when I set the browser to
offline mode.  Can you assist me please?

Thanks.
fondie

Reply via email to