here's what I did to alert user in case their network went down or upon page update failure:
I have a div-tag on the page where I put current time and update this tag every 10 seconds. It looks something like this: <div id="reloadthis">22:09:10</div>
At the end of the javascript function that updates the time in the div-tag, I put this (after time is updated with AJAX):
var new_value = document.getElementById('reloadthis').innerHTML;
var new_length = new_value.length;
if(new_length<1){
alert("NETWORK ERROR!");
}
That's it! You can replace the alert-part with anything you want, of course. Hope this helps.