Drag and drop table row problem

Hello all,
I’m trying my first drag and drop project. Dragging a table row from
one table to another.

First, get table 1 row to be draggable.
I looked over several examples of Prototype/Scriptaculous of drag/drop
and thought I was doing right.
My problem is after setting it up, no dragging.

Table 1

    <% @imports.each do |import| %>
    <% import_id = "import_#{import.id}" %>
    <tr id="<%= import_id %>" class="draggable_item"

style=“cursor:move;”>







<%= draggable_element(import_id, :revert => true ) %>
<% end %>
IRB File
IRB ID Title Pi full name Action
<%=h import.irb_id %> <%=h truncate( import.title, :length => 30 ) %> <%=h import.pi_full_name %> <%= link_to_function(‘View’,
‘showDialog(’+import.id.to_s+’)’ ) %>
<%= link_to_remote “Find Matches”, :update =>
“search_results”, :url => {:controller => ‘projects’, :action =>
‘search’, :id => import.irb_id } %>

I’m not sure what’s wrong.

Thank you for any help.

JohnM

Oh, another thing.

When I click on the row, the all the text in the row does fade (similar
to the drag/drop examples). It seems to me that I’m almost there.

Thank you.

John

John M. wrote:

Hello all,
I’m trying my first drag and drop project. Dragging a table row from
one table to another.

First, get table 1 row to be draggable.
I looked over several examples of Prototype/Scriptaculous of drag/drop
and thought I was doing right.
My problem is after setting it up, no dragging.

Table 1

    <% @imports.each do |import| %>
    <% import_id = "import_#{import.id}" %>
    <tr id="<%= import_id %>" class="draggable_item"

style=“cursor:move;”>







<%= draggable_element(import_id, :revert => true ) %>
<% end %>
IRB File
IRB ID Title Pi full name Action
<%=h import.irb_id %> <%=h truncate( import.title, :length => 30 ) %> <%=h import.pi_full_name %> <%= link_to_function(‘View’,
‘showDialog(’+import.id.to_s+’)’ ) %>
<%= link_to_remote “Find Matches”, :update =>
“search_results”, :url => {:controller => ‘projects’, :action =>
‘search’, :id => import.irb_id } %>

I’m not sure what’s wrong.

Thank you for any help.

JohnM

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