Possible Duplicate:
JavaScript: How to detect that the internet connection is offline?
How to check the internet is connected or not in javascript.
Possible Duplicate:
JavaScript: How to detect that the internet connection is offline?
How to check the internet is connected or not in javascript.
You can try to access a web page in Ajax every selected period of time. This code will help you:
http://www.codeproject.com/KB/scripting/InternetConnectionTest.aspx
It is very useful, and because it is Ajax based, is asyncronous, so you can check if the Internet is conected without leaving the original page.
For your convenience try to access a very fast page from a site that is always online (i.e. Google)