[thelist] [Javascript] unobtrusive scripting, rollovers and IE7, oh my!

Paul Bennett Paul.Bennett at wcc.govt.nz
Tue Jul 18 20:26:21 CDT 2006

>If you switched out the attachEvent function with YUI's event code, your
>code would work fine. http://developer.yahoo.com/yui/event/

Thanks for the heads up Matt.
That file alone is 38Kb!! I know that's not a big deal in this age of broadband net access, but I do like to keep things slim & trim...

>In the IE event model, events are fired in the window context. Thus,
>'this' refers to the window object. YUI's event utility corrects for
>this so that there are no browser differences, but the code you are
>using does not.

So couldn't I then use something like this:

	imgObject = this;
else {
	imgObject = window.event;

Or am I way off-track?

More information about the thelist mailing list