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"[EMAIL PROTECTED])
page.remove('second_appt_drop_div'[EMAIL PROTECTED])

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'[EMAIL PROTECTED]);
page.call << Draggables.unregister('second_appt_drag_div'[EMAIL PROTECTED]);

or

page.call << "Droppables.remove('second_appt_drop_div'"[EMAIL PROTECTED]
+");"
page.call << "Draggables.unregister('second_appt_drag_div'"[EMAIL PROTECTED]
+");"

Gives a Rails error

ActionView::TemplateError (wrong number of arguments (0 for 1))
__________________________________________________________
In the RJS
page.DragndropClearup('div#second_appt_drag_div'[EMAIL PROTECTED],
'div#second_appt_drop_div'[EMAIL PROTECTED])

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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to