I would like to display the time counting down on a webpage when I use this
script.... Is it possible?
<script language="JavaS cript">
<!--
var tID = 0;
var startTime = null;
var timeout=20*(60* 1000) + 0*1000; // 20:00 minutes, as milliseconds
function UpdateTimer() {
if(tID) {
clearTimeout(tI D);
}
var date = new Date();
var diff = date.getTime() - startTime.getTi me();
if (diff >= timeout) {
focus();
window.open('/timeout.htm',"t imeout",'toolba r=0,location=0, directories=0,s ta
tus=0,menubar=0 ,scrollbars=0,r esizable=0,widt h=400,height=20 0');
} else {
tID = setTimeout("Upd ateTimer()", 1000);
}
}
function Start() {
startTime = new Date();
tID = setTimeout("Upd ateTimer()", 1000);
}
// -->
</script>
--
(remove SPAMBLOCK if replying by e-mail)
script.... Is it possible?
<script language="JavaS cript">
<!--
var tID = 0;
var startTime = null;
var timeout=20*(60* 1000) + 0*1000; // 20:00 minutes, as milliseconds
function UpdateTimer() {
if(tID) {
clearTimeout(tI D);
}
var date = new Date();
var diff = date.getTime() - startTime.getTi me();
if (diff >= timeout) {
focus();
window.open('/timeout.htm',"t imeout",'toolba r=0,location=0, directories=0,s ta
tus=0,menubar=0 ,scrollbars=0,r esizable=0,widt h=400,height=20 0');
} else {
tID = setTimeout("Upd ateTimer()", 1000);
}
}
function Start() {
startTime = new Date();
tID = setTimeout("Upd ateTimer()", 1000);
}
// -->
</script>
--
(remove SPAMBLOCK if replying by e-mail)
Comment