Using Scriptaculous, I need to remove the old Draggable and Droppable once a drag and drop is complete. So the drag and drop calls an RJS in which I have tried 3 ways to do this. ___________________________________________________________ page.remove("second_appt_drag_div"+@appt_id) page.remove(''second_appt_drop_div''+@drop_time) This gives an RJS error - TypeError: element has no properties It shows as Element.remove("second_appt_drag_div172"); on the Ajax error Element.remove("second_appt_drop_div20070712"); But it does remove the Draggable - but not the Droppable! ___________________________________________________________ page.call << Droppables.remove(''second_appt_drop_div''+@drop_time); page.call << Draggables.unregister(''second_appt_drag_div''+@appt_id); or page.call << "Droppables.remove(''second_appt_drop_div''"+@drop_time +");" page.call << "Draggables.unregister(''second_appt_drag_div''"+@appt_id +");" Gives a Rails error ActionView::TemplateError (wrong number of arguments (0 for 1)) __________________________________________________________ In the RJS page.DragndropClearup(''div#second_appt_drag_div''+@appt_id, ''div#second_appt_drop_div''+@drop_time) and then in the application.js function DragndropClearup(AppId, DropTime){ Droppables.remove(DropTime) Draggables.unregister(AppId); } No errors - but does nothing! ____________________________________________________________ This should be easy to do - but I can''t find the way! Any ideas? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---