Reputation: 4233
I have a site which have a div in updatepanel, which is refreshed every 10 seconds, and I pass string result to div. If connection is dead, i get error that server is unavailable, which should not happen.
My question is, how to check clientside if connection is down, so I can just pass empty string to that div, and that page remains.
Thanks.
Upvotes: 0
Views: 149
Reputation: 1550
See this:
Check if Internet Connection Exists with Javascript?
If you need an immediate solution, you could use this:
var online = navigator.onLine;
Upvotes: 1