[Ruby] JavaScript in FormHelpers
Neil Moomey
neil at motznik.com
Mon Nov 20 09:33:23 PST 2006
How do I add JavaScript to FormHelper tags? For example in a radio button I
want to display something like :
<input value="Address" name="searchby" type="radio" id="Address"
onClick="javascript:redirect(' QueryA1R1.rhtml')" />
but I want to use a FormHelper like:
<%= radio_button "post", "category", "rails" %>
Also, why do Form helpers always output arrays for the name attribute?
name=post[category]
Thanks
Neil
More information about the Ruby
mailing list