Strange problem with partials and drag and drop

Hi,

I am playing with a small test app for drag and drop. The structure is
as follows:

  • 1001 11384
  • The view code for generating this consists of 3 partials,

    _update_status.rhtml

    <%= render(:partial => 'update_queue') -%>
    <%= render(:partial => 'update_agent') -%>

    _update_queue.rhtml

      <% @queue.each do |q| -%> <% domid = "id#{q[:callerid]}" -%>
    • <%= q[:callerid]-%> <%= q[:wait] -%>
    • <%= draggable_element domid, :ghosting=>true, :revert=>true %> <% end -%>

    _update_agent.rhtml

    • <%= q[:name] -%> (<%=q[:status]-%>)
    • <% end -%>

    main view is index.rhtml

    <%= render(:partial => 'update_status') -%>

    <%= link_to_remote ‘Check Status…’,
    :url => {:action => ‘index’},
    :update => ‘update_status’ %>

    <%= drop_receiving_element(‘agent_list’,
    :accept => ‘queue_item’,
    :hoverclass => ‘hover’,
    :with => “‘queue=’ + encodeURIComponent(element.id)” ,
    :url => {:action=>:index})%>

    This just defined the update_status div and a “check status” link. In
    the controller I have code like this

if request.xml_http_request?
  render :partial => "update_status", :layout => false
end

All pretty standard stuff.

Now When I do a full page refresh I get the full code and I am able to
drag and drop, but strangely if I click the “check status” link the
java script in queue_list