If you are working in a object oriented context... where "myObj" is some object which has a function named "doSomething", the following will work, as it will return a pointer to the myObj.doSomething function... if you are working with a only globally scoped functions, try replacing "myObj" with "window" below...
Event.observe(node.getAttribute('id'), fun.getAttribute('action'), myObj[fun.getAttribute ('do')] );
On 11/8/06, James <[EMAIL PROTECTED]> wrote:
err... so, it works using eval
eval("Event.observe(node.getAttribute('id'),fun.getAttribute('action'),"+fun.getAttribute("do")+")");
I'm going to run with this for now, but I like to avoid eval so if
anyone has a better idea get at me.
Thanks,
James
http://www.someElement.com
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
- [Rails-spinoffs] Event.observe: problem dynamically load... [EMAIL PROTECTED]
- [Rails-spinoffs] Re: Event.observe: problem dynamic... James
- [Rails-spinoffs] Re: Event.observe: problem dyn... Ryan Gahl
