How to displaying online offline connection status in page.
how to display a kind of popup when the network is not connected to the internet.
Hi arie.keren,
Check this example. The following code executes on every two second and checks if connection is there or not.
HTML
<script type="text/javascript"> window.onload = function () { setInterval(function () { if (!navigator.onLine) { alert("You are not connected to Internet, ensure you're not in airplane mode. \n\nYour internet signal may be week. \n\nPlease connect to internet and try again."); } }, 2000); } </script>
Demo
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.