Does anyone know how to check the time, and if the time reaches a certain value trigger an event to occur? I have tried the Timeout function with the following code, but it acts like the hour value is 24, and goes to the SendEmail function, no matter what the time is.
<script language="JavaScript"><!--
function everyHour() {
today = new Date();
hour = today.getHours();
setTimeout('everyHour()',3600);
document.write (hour) // check value
if (hour == 24)
{SendEmail()}
else
{DoNothing()}
}
everyHour(); // start the funtion
//--></script>
<script language="JavaScript"><!--
function everyHour() {
today = new Date();
hour = today.getHours();
setTimeout('everyHour()',3600);
document.write (hour) // check value
if (hour == 24)
{SendEmail()}
else
{DoNothing()}
}
everyHour(); // start the funtion
//--></script>