I'm trying to check if browser has internet connection with javascript but I encountered some problems on IE 5.5
<script>
function checkConnection(){
if(navigator.onLine === false){
//document.execCommand("Stop");
alert("No internet connection.");
document.execCommand("Stop");
}
</script>
and:
<input type="submit" value="GO" name="whereTo" onclick="checkConnection();" />
It seems that IE 5.5 doesn't have navigator.onLine property, how can I check for connection for IE 5.5?
Why not trying to send an AJAX request? It won't check if you're strictly online, but it would tell you if you can reach something... Trying a couple of URLs might be enough...