Take a look at UnobtrusiveJavascript for rails.
It's perfect for what you're looking to do. Ian.
Josh Kieschnick wrote:
Take a look at UnobtrusiveJavascript for rails.
It's perfect for what you're looking to do. Ian.
Josh Kieschnick wrote:
i have some items that use the link_to_remote helper and i would like
them to also link directly to the page that they are calling if
javascript is not available. i have tried putting the action and id in
like i would with a regular link_to helper but that didn’t work.
how can i accomplish this?
Forms:
<%= form_remote_tag(:url =>{:action => “myaction”}, :html => {:action => url_for(:action => “myaction”), :id => “myform”}) %>
Links:
link_to_remote(“mylink”,{:url => {:action => “myaction”}},{:href => url_for(:action => “myaction”)})
Best regards
Peter De Berdt