Click to See Complete Forum and Search --> : Server Status Checking


vbprog40
11-18-2003, 08:40 PM
I have this code:

<script type="text/javascript">
var img = new Image();
img.src = 'http://www.what.com/myimage.gif';
img.onload = function () {document.getElementById("online").style.backgroundColor="green";}
img.onerror = function () {document.getElementById("online").style.backgroundColor="red";}
</script>
Server Status: <span id="online" style="width: 10px; height: 10px; background-color: transparent; font-size: 1px;"></span>

Is there a way to do this so it checks a server through maybe say a PORT for example? I have servers that are only DHCP servers. They do not have webservers running on them so there is no way to load a image from it. I want to put this code on a employee page I have.

Thank you for all your help!
Chris