|
I'm working on some homework for a class and I created a function called worldClock() in the heading tag as shown and then I called it with the onload attribute of the body tag. Only in the firefox error console it says that "worldClock() is not defined". Can anyone tell me what i'm missing?
Thanks,
Levi
-------------------------------------------------------------- Code
<script type="text/javascript" src="../common/zones.js">
function worldClock()
{
var today = new Date();
var offSet = today.getTimezoneOffset() * 60 * 1000;
var GMT = addTime(today, offSet);
var time1 = addTime(GMT, (-360)*60*1000);
var time2 = addTime(GMT, 0*60*1000);
var time3 = addTime(GMT, (-300)*60*1000);
var time4 = addTime(GMT, (-480)*60*1000);
var time5 = addTime(GMT, 660*60*1000);
var time6 = addTime(GMT, 540*60*1000);
document.zones.place1.value = time1;
document.zones.place2.value = time2;
document.zones.place3.value = time3;
document.zones.place4.value = time4;
document.zones.place5.value = time5;
document.zones.place6.value = time6;
}
</script>
</head>
<body onload="setInterval (worldClock(), 1000);">
|