This can easily add multiple event handlers to an object, in all common browsers. It also stops MSIE leaking memory and passes the correct event object to handler functions, amongst many oither handy features!
Script License Agreement
This may be freely used as long as its credit notice comment remains intact.
And if you find this useful, you're more than welcome to consider making a donation to support its development :).
If you want, you can view an online demonstration.
To download this permanently: addevent.zip (6kb).
Compatibility - Testers Needed!
If you have a copy of a browser not listed as 'Tested and Works', please tell me if it works or not - thanks! Take these as a guide only, and be sure to test in all target environments.
- Tested and Works: IE6/Win, IE5.5/Win, IE5/Win, IE4/Win, Mozilla/Win, Opera 5/Win, Opera 6/Win, Opera7/Win, Opera 8/Win, Safari/Mac, IE5/Mac.
- Untested, Probably Works: IE4/Mac, Mozilla/Mac, Opera/Other, Konqueror/Linux.
- Does nothing in v3.x browsers, of course. It doesn't include NS4 event model support by default, but you could add it with a captureEvents() call.
This is the first public release of this script.