having trouble finding how to include a random chunk of javascript (an
onclick event handler) in a link_to generated link.
at first i thought i could use the html_options field, but if i
understand
correctly, that only supports :confirm, :popup, and :post options.
hope i’m wrong. anyone know different?
john
John McGrath wrote:
having trouble finding how to include a random chunk of javascript (an
onclick event handler) in a link_to generated link.
at first i thought i could use the html_options field, but if i
understand
correctly, that only supports :confirm, :popup, and :post options.
hope i’m wrong. anyone know different?
john
pretty much anything you put in the html options will show up in the
html, except for those few exceptions. Just put “onclick”=>“random
code” in and try it.
_Kevin