As a detailed, what i need is that :

        Element.addMethods('input', {
                initialize: function(element) {
                        // do some initialization for any inputs ...
                onblur: function(element) {
                        // do something for any inputs on blur ...
                onfocus: function(element) {
                        // do something for any inputs on focus...
                // etc

I need to be triggered to onBlur and onFocus for all inputs, but i
also need to perform additional initialization at input creation.

On Jul 9, 7:18 pm, "Dan Dorman" <[EMAIL PROTECTED]> wrote:
> On Wed, Jul 9, 2008 at 10:50 AM, onitsuka <[EMAIL PROTECTED]> wrote:
> > That's true, but even if it had bubbled that would not have solved my
> > problem :-)
> It would absolutely solve your problem! In your original post, you
> said, "I would like to register a method which will be called when the
> onfocus events is triggered on any INPUT without having to register it
> explicitly on all INPUTs". That is a perfect example of what event
> delegation can do.
> Unfortunately, the fact that onfocus doesn't bubble is what renders it
> useless for your situation. If you were capturing clicks or
> mouseovers, though, you'd be set.
> :Dan
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
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at

Reply via email to