[thelist] addLoadEvent overwritten by onload attribute of body tag

Ben Glassman bglassman at gmail.com
Tue Jul 25 08:13:42 CDT 2006

I just recently completed a job for a client that had their own
in-house web person who isn't that familiar with javascript. I had
used the addLoadEvent function to add functions to window.onload.
Their developer is now running into issues because they keep trying to
add rollovers and other javascript using dreamweaver, which is adding
onloads directly to the body of the document and thus overwriting the
addLoadEvent function.

Is there a solution to this other than (a) moving my javascript to the
body onload attribute, which is less than desirable (b) trying to
train this person on how to use the addLoadEvent function, which is
not particularly plausible considering the budget of the project and
their current level of knowledge with regard to javascript

I think I'm basically asking there is another addLoadEvent function, I
think I'm using Simon Willison's, that will someone not get overridden
by the body onload tag?

Thanks a lot


More information about the thelist mailing list