Kangax: this works like a charm.
> (new Button()).setActions( function(){
>   alert(123);
>   alert(321);
> } );
>
> and define `setActions` method like so:
> ...
> setActions: function(handler) {
>   $(this.id).observe('click', handler);}
> ...
This is very nice, what would we do without experts such as yourself!
I've managed to make it work.
One more question: I'd like to make it easy for my team to setActions
for the new button class. If I use the renovated method as above, I
have to write an extra function(){ } code to contain the actions I
want to pass to the button. Is there any way to simplify the process?
--
Cliff

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to