I think that's the only way you're going to get the actual click. Oh,
I suppose you could observe the click event on a parent element, but I
don't think that form elements follow the rules of bubbling events the
same way that other page elements do. You'll have to test on a number
of browsers and see if something like this works:
$('myForm').observe('click',function(evt){
var elm;
if( elm = evt.findElement('input#myFirstSubmit') ){
//do something here
}else
if( elm = evtFindElement('input#mySecondSubmit') ) {
//do something else here
}
});
Walter
On Dec 22, 2010, at 3:06 PM, kstubs wrote:
How do I get the form element, by wiring up a click event on each
button?
--
You received this message because you are subscribed to the Google Groups "Prototype
& script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.