[Ruby] JavaScript in FormHelpers
Neil Moomey
neil at motznik.com
Mon Nov 20 16:49:00 PST 2006
Thanks Tom! That worked! You had one minor typo which was an extra ) at
the end so it should look like this:
<%= radio_button("post", "category", "rails",
{:onclick=>"javascript:redirect('QueryA1R1.rhtml')"}%>
and this seems to work as well:
<%= radio_button("post", "category", "rails", options =
{:onclick=>"javascript:redirect('QueryA1R1.rhtml')"}%>
Amazingly I could not find one single example on the Internet or in my Rails
books, even the beta Agile Web Development with Rails. I guess that's one
of the drawbacks of new technologies. Most of the Rails books seem very
introductory and light on Rails, heavy on Ruby. The Agile books seems to be
the best so far. I printed the entire pdf.
Neil
More information about the Ruby
mailing list