uberllama wrote:
[...]
> Basically, I want my form builder to automatically add an :onchange
> handler to a specific form field (for my example, I am using
> an :onclick with a generic form builder).
[...]

This is really not a good way of doing it.  HTML and JS work best 
together when they are in completely separate files -- so don't put your 
onclick and onchange handlers in the form builder.  (I know Rails 
encourages embedding JS in HTML, but that's a problem with Rails.) 
Rather, attach the handlers in the (separate) JS file: 
$('whatever').onClick = function () { ... }, or some such (Prototype's 
event handler enhancements may be fun here).

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to