Hello
I wonder why this happens:
this:
<%= link_to_function image_tag("chart_bar.png"),
:onclick=>"new
Effect.toggle(''bar-project#{project.id}'')" %>
outputs this:
a href="#" onclick="onclicknew
Effect.toggle(''bar-project188''); return
false;"><img alt="Chart_bar"
src="/images/chart_bar.png?1142196636"
/></a>
the link_to_funtions returns twice onclick hence it will not work.
please help
--
Posted via http://www.ruby-forum.com/.
> <%= link_to_function image_tag("chart_bar.png"), :onclick=>"new > Effect.toggle(''bar-project#{project.id}'')" %> >I think you want this instead: <%= link_to_function image_tag("chart_bar.png"), "new Effect.toggle(''bar-project#{project.id}'')" %> -- Posted via http://www.ruby-forum.com/.