Making <tr> a link_to?

Hi, wondering how I could make a

call an action or something like
that =)

Thanks

Hi, wondering how I could make a

call an action or something like
that =)

I don’t recall exactly if there are any issues with browsers not
passing that click up from

's or not, but that should get you
started.

Philip H. wrote:

Hi, wondering how I could make a

call an action or something like
that =)

I don’t recall exactly if there are any issues with browsers not
passing that click up from

's or not, but that should get you
started.

I was thinking of using javascript, but that still doesn’t help T_T I
don’t know how to make a :action call =(

Thanks for the post, though

maybe

<% content_tag :a, :href => “#”, :onclick => your_action do %>

hi there
<% end %>

Hey, thanks for the help. I managed to get it to work with your guys’
help, but now I’m not sure how to make it a link_to_remote. Thanks!

<tr onclick="location.href='<%= blog_path(blog) %>'>

Justin To wrote:

Hey, thanks for the help. I managed to get it to work with your guys’
help, but now I’m not sure how to make it a link_to_remote. Thanks!

Just to clarify, link_to and link_to_remote are view helper functions
that generate tags in your page, and the only different is that
link_to_remote writes in javascript that will generate an AJAX request
to the server instead of a traditional GET request. If you want a helper
method to generate table rows that execute an AJAX request when clicked,
you’ll have to write it yourself.