]|V|[agnus
07-04-2004, 11:32 PM
I would like to call several sort of 'init' type functions when a document loads. I understand that listing several for window.onload doesn't work because each new one overwrites the previous or something to that effect, yes?
I did some searching and it appears that to achieve this I either need to a) list functions in the <body> onload attribute or b) attach events using JavaScript or something to that effect.
I am interested in the latter because of my interest in keeping behavior seperate from the structure. From what I've been able to gather, this is a purist approach which is hard to get universal functionality for, but maybe I do not understand correctly.
I'm ultimately just looking for the smartest, simplest approach to get the desired result. Any pointers or references?
I did some searching and it appears that to achieve this I either need to a) list functions in the <body> onload attribute or b) attach events using JavaScript or something to that effect.
I am interested in the latter because of my interest in keeping behavior seperate from the structure. From what I've been able to gather, this is a purist approach which is hard to get universal functionality for, but maybe I do not understand correctly.
I'm ultimately just looking for the smartest, simplest approach to get the desired result. Any pointers or references?