I'm trying to make it so that when the stime function reaches 00:00, the div id "refresh" will refresh the content inside..
<script type="text/javascript">
var currenttime = '<? print date("F d, Y H:i:s", time())?>'
var montharray=new
var serverdate=new Date(currenttime)
function stime(){
var fiveMinutes = 5 * 60 * 1000;
var untilNext = fiveMinutes - (serverdate % fiveMinutes);
var timer=(untilNext / 1000)
var minutes= "0" + Math.floor(untilNext / 1000 / 60)
var seconds= "0" + (timer - minutes * 60)
document.getElementById("stime").innerHTML=minutes.substr(-2)+":"+seconds.substr (-2)
}
window.onload=function(){
setInterval("stime()", 1000)
}
</script>
<?php
echo '<div id="refresh">Health: <span style="float:right" id="stime"></span></div><br />';
?>
My Question
Is it possible with that function, to make another function that would refresh the div when the stime function reaches 00:00 ?