Hello, I have been working on this for some time and am stumped and really need help. This shouldn't be hard for those that understand javascript better than I do.

For some reason the error message I get for this says it wants a paranthesis here right after 24: "if (tm() = 24)"
Which makes no sense because current time results from javscript should look like this 00:00:00. The first part being the hours, second being the minutes, and last being the seconds. So I don't know why it would want a paranthesis there. But when I do put a paranthesis there just to remove the error, it doesn't refresh the page at the right time anyway.

Here's the code: All it supposed to do is get the current time for the day. If the time for the day is midnight, it is supposed to do a setTimeout in 3 seconds after midnight.

<script type="text/javascript">
function tm(){
var d = new Date()
$hr = d.getHours()
$mn = d.getMinutes()
$sc = d.getSeconds()}
if (tm() = 24:60:60)
{setTimeout('self.location.reload(true)',3000);}
</script>

Please let me know what I am doing wrong, thanks very much.