Click to See Complete Forum and Search --> : Looking for an UP/DOWN status indicator


Converse
12-03-2003, 11:52 AM
We make a Data Connection (DSL/Cable/T1) Wireless using 802.11b technology. We have a Net Access box (AAA) that allows or disallows access to the Data Source. I am looking for some type of code that can be used, to allow the end user to see if the Data Source is, or isn't available.
The Net Access box presents a Web Page to the end user so they can pick the length of time and payment method to gain access to the Data Source. As a Data Source can go down, I am looking for a simple way to code in an UP/DOWN status of the Data Source, so as to minimize the End Users time wasted getting authenticated and authorized to only be denied the service requested.
I was trying to use a simple Java Script that would pull a Green Icon from our Central Server, and if unavailable would then show a Red Icon. I am having a problem with the script. Before, I spend another 4 hours on it. I was hoping someone might have something that would work better.
Thank You.

TheBearMay
12-03-2003, 12:32 PM
Try this:

<script>
var TimerAddr;
function testAvail(){
availIndic.src="http://dataserver/available.gif";
clearTimeout(TimerAddr);
TimerAddr=setTimeout('testAvail()',3000);
}
function loadAlt(){
availIndic.src="notAvailable.gif";
clearTimeout(TimerAddr);
TimerAddr=setTimeout('testAvail()',3000);
}
</script>
</head>
<body onload="testAvail()">
<img id="availIndic" onerror='loadAlt();'></img>
...