That's a really long post, so rather than reply to individual pieces
how about just a quick example...
This JS would be in an included JS file, in your document's head:
function initializePage(){
$('my-div').observe('click', divClicked);
}
function divClicked(event){
var myDiv = event.element();
}
Event.observe(document, 'dom:loaded', initializePage);
Then your HTML would be JavaScript free.
-justin
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---