vbprog40
10-28-2003, 02:41 PM
I saw this code to view the status of a Server. (Up or DOWN)
<script type="text/javascript">
var img = new Image();
img.src = 'http://www.yourdomain.com/images/spacer.png';
img.onload = function () {document.getElementById("online").style.backgroundColor="#00ff00";}
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>
But I was wondering if there is a way to do this for a server without a "WEBSERVER" (can't load a image from it). ie.: DHCP Server, Internet Server
I was thinking maybe by pinging it somehow...? not sure
THANK YOU!
<script type="text/javascript">
var img = new Image();
img.src = 'http://www.yourdomain.com/images/spacer.png';
img.onload = function () {document.getElementById("online").style.backgroundColor="#00ff00";}
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>
But I was wondering if there is a way to do this for a server without a "WEBSERVER" (can't load a image from it). ie.: DHCP Server, Internet Server
I was thinking maybe by pinging it somehow...? not sure
THANK YOU!