loading 2 functions in a document?

I have two scripts, a date script and clock script. I'm trying to call both of the functions, but I only know how to call one of them using onload in the body tag. I tried "document.body.onload", but that's just the same. What's the other ways of calling the function?<br />
<br />
Thanks.<!--content-->I feel stupid. Just writing the function calls it.<br />
<br />
I was tired when posting this and posted it in the wrong thread, sorry.<!--content-->As you found out, you can only have on onload directly in the script, so you will have to do one of these two things:<br />
<br />
1: put both functions in the <body>'s onload, like this: <body onload="functionOne(); functionTwo();"><br />
<br />
2: in the onload event, run a function that will in turn call your other functions:<br />
<br />
<script type="text/javascript"><br />
function functionOne() {<br />
alert ("One");<br />
}<br />
function functionTwo() {<br />
alert ("Two");<br />
}<br />
window.onload = function() {<br />
functionOne();<br />
functionTwo();<br />
}<br />
</script><!--content-->
 
Back
Top