Michael Fesser wrote:
Quote:
You can have multiple scripts/calls on the onload-event, separated by
semi-colons:
body onload="doThis(); doThat(); doNothing(); wasteTime();" |
Or to keep it simple, I usually create an initialization function like
<body onload="init();">
and then call all the startup functions in one script in the head like
<script>
function init() {
doThis();
doThat();
doNothing();
wasteTime();
}
</script>
A little bit longer, but I find it easier to read and debug, since it's
easy to comment out one function at a time for testing.
- Josh