Hi,
I am playing with a small test app for drag and drop. The structure is
as follows:
- 1001 11384
- <%= q[:callerid]-%> <%= q[:wait] -%> <%= draggable_element domid, :ghosting=>true, :revert=>true %> <% end -%>
- <%= q[:name] -%> (<%=q[:status]-%>) <% end -%>
The view code for generating this consists of 3 partials,
_update_status.rhtml
_update_queue.rhtml
-
<% @queue.each do |q| -%>
<% domid = "id#{q[:callerid]}" -%>
_update_agent.rhtml
main view is index.rhtml
<%= 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
- is missing. To illustrate further
let me attach some screen shot of firebug with and with out problem.-
After a full refresh (via browser reload button)
ImageShack - Best place for all of your image hosting and image sharing needs -
After I click the “check status” link
ImageShack - Best place for all of your image hosting and image sharing needs -
Even more strange is the fact that response from server does indeed
have the necessary javascript. The firebug console with response
highlighted.
ImageShack - Best place for all of your image hosting and image sharing needs
I am pulling my hair out due to this issue for the past 3 days, If you
need any more info please feel free to ask.Thanks for reading, and hopefully, for answering
regards,
raj -