Passing parameter to open dialog using link_to_function

Hello all,
I’m having one fun time trying to past a parameter to a javascript
function using link_to_function.

This is what I have…

  1. A simple project, controller, views, model.
  2. Prototype Window dialog box installed.

What I’m trying to do is on the index.html.erb, instead of link_to
“show”, project I’m using link_to_function “Show”, "’.
I want to past the to If I do, it blows up.

  • index.html.erb -

<%= javascript_tag(“project = new Window({
className: ‘alphacube’,
title: ‘Project Details’,

foo bar
) %> <% projects.each do |project| %> <% end %>
CTSI Project DB
Project ID IRB ID Title Pi full name Action
<%=h project.project_id %> <%=h project.irb_id %> <%=h truncate( project.title, :length => 20 ) %> <%=h project.pi_full_name %> <%= link_to_function 'View', '' %>

Any help will be greatly appreciated.


I removed the Prototype window and went will jQuery UI Dialog instead.
It was easier to work with and more examples in regards to what I’m
trying to accomplish.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs