HELP!! Javascript Timezone clock

wxdqz

New Member
Hello everyone:

I am working on a page (<!-- m --><a class="postlink" href="http://edesedoret.com/company.html">http://edesedoret.com/company.html</a><!-- m -->) (the page with a portion of the new script has been uploaded to my server) for my new site which contains a map, that illustrates the position of the sun based on GMT. I received the following script which would enable images (stored in maps bin numbered 00.gif to 23.gif) to change every hour based on the GMT:

<script language=javascript>
function update()
{
var curDate = new Date();
time = curDate.getUTCHours();
hour = ss = (time<10)?"0"+time:time;
document.getElementById('pic').src=hour+".gif";
setTimeout("update()",1000);
}

</script>
</head>

<body onload="update()">
<img src=http://www.webdeveloper.com/forum/archive/index.php/"01.gif" id="pic">
</body>

</html>

I am not sure where to place the following line without causing the page to distort:
<body onload="update()">
 
Back
Top