Hi,

We've started transitioning to a new, better-named, hopefully-spam-
free group for Prototype and script.aculo.us:

   http://groups.google.com/group/prototype-scriptaculous/

   [EMAIL PROTECTED]

Could you please post your question there instead?  Thanks!  People
might still answer here, but probably not for all that much longer...
--
T.J. Crowder
tj / crowder software / com

On Jul 9, 12:59 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I saw this discussion about how native events cannot be fired by
> Element.fire and how that could be solved with a custom-event 
> proxyhttp://groups.google.com/group/rubyonrails-spinoffs/browse_thread/thr...
>
> Can any of you more experienced Prototype/JavaScript coders give me
> feedback on this solution? It adds a method to Element that lets me
> register for native events and automatically create a proxy. Are there
> any sideeffects I'm not aware of to doing this? (I'm an experienced
> Java coder, but very new to JavaScript and the dynamic prototype-style
> of coding).
>
> Element.addMethods({
>                 createObserverProxy:function(ele,evt,proxy_evt,handler) {
>                         
> ele.observe(evt,function(){this.fire(proxy_evt)},false);
>                         if(handler instanceof Array) {
>                                 for(var i = 0; i <handler.length; i++) {
>                                         ele.observe(proxy_evt,handler,false);
>                                 }
>                         } else {
>                                 ele.observe(proxy_evt,handler,false);
>                         }
>                 }
>         });
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-spinoffs@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to