Hi, I'm trying to get my javascript to execute after clicking a link on
my page using :format => "js" here's my link:
<%= link_to image_tag("/images/icons/user_add.png"),
add_contact_path(:profile_id => profile.id, :url => request.url, :format
=> "js"), :title => "Add person to your contacts"%>
in my controller i have format.js
here's my add_contact.js.erb:
$("#contact_icon_<%=params[:profile_id]%>").html("Contact Added")
Right now it just prints that code on the screen instead of executing
it. I've done this before with a form where I submitted with AJAX but
never with just a straight link before. Any thoughts? Thanks!
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.