Hi
I’m not the best at programming, and I taught myself, and I’m stuck with this one. What I want it, I have a textbox stopwatch (edited script) that I use for work, and I would like to make either the textbook backgrounds color or the text color change when the time goes past a certain value, for instance, after 800 seconds the text turns red.
I have looked everywhere for this, i figured it would be simple, but as I cant find anything on it, I’m beginning to think it does not exist. I posted the code I have below.
[CODE]
<html>
<head>
</head>
<body bgcolor=”#000000″>
<center>
<form name=exf1> <font color=”#FFFFFF”>
hour: <input size=1 type=text name=hour value=”0″ onfocus=blur()>
min: <input size=2 type=text name=tmin value=”0″ onfocus=blur()>
sec: <input size=3 type=text name=sec value=”0″ onfocus=blur()>
</font>
<br><br>
<input type=button value=”Start / Reset” onclick=”startIt()”>
<input type=button value=”Stop” onclick=”stopTimers()”>
</form>
<script>
var _myTimer_ms = null;
var _myTimer_s = null;
var _myTimer_m = null;
var _myTimer_h = null;
function updateS() { document.exf1.sec.value = (1+parseInt(document.exf1.sec.value)) }
function updateM() { document.exf1.tmin.value = (1+parseInt(document.exf1.tmin.value)) }
function updateH() { document.exf1.hour.value = (1+parseInt(document.exf1.hour.value)); }
function startIt() {
stopTimers();
resetTime();
_myTimer_s = setInterval(“updateS()”,1000);
_myTimer_m = setInterval(“updateM()”,1000*60);
_myTimer_h = setInterval(“updateH()”,1000*60*60);
}
function stopTimers() {
clearInterval(_myTimer_s);
clearInterval(_myTimer_m);
clearInterval(_myTimer_h);
}
function resetTime() {
document.exf1.sec.value=0;
document.exf1.tmin.value=0;
document.exf1.hour.value=0;
}
</script>
</center>
</body>
</html>
Sorry bit of a mess.
Thank You in advance
kirt