I was reading this article on Hunlock.Com about adding multiple events on window.onload. Window.onload=functionName(); does fall short in adding multiple events. The function he made there is really handy in adding any any number of events you wish. I made another version of the same utility. Here's the what it is:

The function
registerEvents(funcs)
{
for(i=0;i<arguments.length;i++)
arguments[i]();
}


Usage
Just add onload="registerEvents(functions,you,want,to,add,on,windowonload);" as an attribute in your <body> tag.

Technorati Tags:

Labels:

blog comments powered by Disqus