

adiboy said:Anyone know any javascript code that can showcase date and time but without the use of body onload function?
Format must be similar to this but the time must be running.
http://www.dynamicdrive.com/dynamicindex6/clock2.htmadiboy said:but the time must be running.
adiboy said:Anyone know any javascript code that can showcase date and time
No, onload only executes the function to display the clock when the page loads, but you could call the function elsewhere in the page.Daniel said:That one uses onload, is it really that important whether onload is used or not?
DynamicDrive tells you to use the following code to make it work:weblord said:
<body onLoad="goforit()">
<script>goforit();</script>
Irieman said:No, onload only executes the function to display the clock when the page loads, but you could call the function elsewhere in the page.
Try the script weblord posted :
DynamicDrive tells you to use the following code to make it work:
It also works if you add the following code to your page, but is only displayed after the function is executed, so try to place this near the top of your html, but after the body tag:Code:<body onLoad="goforit()">
Hope this helps,Code:<script>goforit();</script>
Richard



