On Aug 7, 2007, at 2:49 PM, Dia wrote:
> alert(Event.element(event).getAttribute('class'));
>
> with Firefox, no problem, the alert shows correct values
> with IE, the alert says "null"
IE doesn't do well with getAttribute('class'). Access className
directly from the element:
var str = Event.element(event).className;
On Aug 7, 2007, at 4:00 PM, Ken Snyder wrote:
> I don't believe the Event.element() automatically extends the
> element so
> you need $(Event.element(event)).getAttribute('class')
'Tis not so. getAttribute() is a DOM function, not a Prototype
extension.
Old versions of Prototype didn't extend the element, but new versions
do. Either way, as getAttribute isn't a DOM function, it's irrelevant
here.
TAG
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---