Here is the code to add a real time clock to the HS 2 header.
This will work even if you are using the scrolling weather forcast.
Add this to meta.htm
This is similiar to the other clock script posted but note that it writes to clock.innerHTML and not userclock.
Then go to Setup, WebSite and find Functions To Call with Body Onload.
Add this to the text box.
If you are doing both the clock and weather then make sure you seperate the function calls by a ;
This will work even if you are using the scrolling weather forcast.
Add this to meta.htm
PHP Code:
<script>
<!--
function clockTime() {
var dte = new Date();
var intYear = dte.getYear();
var intDay = dte.getDate();
var intMonth = dte.getMonth() + 1;
var intHours = dte.getHours();
var intMins = dte.getMinutes();
var intSec = dte.getSeconds();
var strAmPm;
if (12 < intHours) {
strAmPm="PM";
intHours-=12;
} else {
strAmPm="AM";
}
if (intHours == 0) intHours=12;
if (intMins<=9) intMins="0"+intMins;
if (intSec<=9) intSec="0"+intSec;
clock.innerHTML = intMonth+'/'+intDay+'/'+intYear+' '+intHours+':'+intMins+':'+intSec+' '+strAmPm;
}
function startClock() {
setInterval("clockTime()",1000);
}
//-->
</script>
Then go to Setup, WebSite and find Functions To Call with Body Onload.
Add this to the text box.
PHP Code:
startClock()
PHP Code:
displayWeather();startClock()