I've been searching for a simple cross-browser way of adding an event listner.
I've found these two methods, which is the best or are both required for cross browser functionality...
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
I've found these two methods, which is the best or are both required for cross browser functionality...
Code:
obj.attachEvent( 'onload', 'myfunc' );
[b]or[/b]
obj.addEventListener( 'onload', 'myfunc', false );
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!