ed wrote on 22 jun 2007 in comp.lang.javascript
:
On Jun 22, 5:24 am, Michael Landberg <goodmin...@hotmail.comwrote:
>On 22 jun, 10:47, "Evertjan." <exjxw.hannivo...@interxnl.netwrote:
Michael Landberg wrote on 22 jun 2007 in comp.lang.javascript:
is it possible to load multiple onload events in the body tag?
onload events are not "loaded" themselves.
<body onload='action1();action2();'>
>Yes, excuse me for not making myself clear. I meant ofcourse calling
multiple functions from the body event.
But thank you for the answer.
[Please do not toppost on usenet]
You could also just attach a function to onload that calls two or more
actions:
<body onload="onLoadFunction();">
function onLoadFunction() {
actionOne();
actionTwo();
.
.
.
actionOneHundred();
}
Indeed you could, but should the OP?
Keeps more JS out of the HTML which is cleaner.
An argument, be it a subjective one, not really related to the OQ.
You should also think
You could, should the OP?
about attaching the events from inside the JS. You can use the code
here:
http://therealcrisp.xs4all.nl/upload/addEvent_dean.html
No, I don't think that is up to the OP's level.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)