Hi all,
Start to pick up javascript lately and trying out a simple script to update my time on the windows status bar. My code is as follows:
If working correctly, the code should show the user the LIVE time on the status bar...but its not.(it only display once upon loading and that's it )
Any help is greatly appreciated. Thank you.
Start to pick up javascript lately and trying out a simple script to update my time on the windows status bar. My code is as follows:
Code:
//Inside the Header tag
function displaytime(){
var currenttime = '<?php print date("F d, Y H:i:s", time())?>'
window.status =currenttime
}
window.onload=function(){
setInterval("displaytime()", 1000)
}
Any help is greatly appreciated. Thank you.