Event handler (in this context) gets event object as a first
argument.
This event object does NOT have innerHTML property.
Since you are using 1.6, a preferred way to access element is via
"this",
event.element() or event.target.
document.observe('click', function(event) {
alert(event.element().innerHTML);
// or
alert(this.innerHTML);
...
})
- kangax
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---