I have three functions I need triggered when page loads, so have
<body onload="function1();function2();function3()">
but I want to take all these function calls out of body tag and call
them in header, thus:
window.onload=function1;function2;
but I just realized that only first function in this list gets called
this way (if I put function2 first only function2 one gets called) also
noticed (http://scriptasylum.com/tutorials/pageevents.html) that when
you call functions this way you don't include '()'.. i.e., you do
window.onload=function1; // and not
window.onload=function1();
so how do you do it if you need to pass arguments to the functions(s)?
this is what I need to do:
window.onload=function1;function2;function3('arg') ;
but I can't get this to work...
(also noticed that onload is event handler of body, not window, so how
come get error on this: document.body.onload=function... etc.)
thank you..
Frances