gregor
2006-Nov-24 14:42 UTC
sortable - after complete dropping element want to send ajax reqeust with id of elements: draggable and droppable
Hi all. I have specific situations - I use sortable on html list, and after I move elements I want to do ajax reqeust to serwer with the id of dragging element and id of the element that was droppable. How to do it? which function in Sortable class i have to overrider or modify? i try to modife onhover method in sortable and put a ajaxRequest call before methods dropon.parentNode.insertBefore (line 742 or line 758) but I noticed that piece of code is executed whenever i release the mouse button (and finally change position of elements) or not. So how to do this? Please help me and thanks Gregor --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Marius Feraru
2006-Nov-24 15:25 UTC
Re: sortable - after complete dropping element want to send ajax reqeust with id of elements: draggable and droppable
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 gregor wrote:> I have specific situations - I use sortable on html list, and > after I move elements I want to do ajax reqeust to serwer with the id > of dragging element and id of the element that was droppable. How to do > it? which function in Sortable class i have to overrider or modify?You don''t need to modify anything, just remember that those "Sortables" are in fact Draggables/Droppables. Sortable.create() [1] allows you to pass options for those objects. In this case you want Draggable''s "endeffect" [2] and Droppable''s "onDrop" [3]. [1] http://wiki.script.aculo.us/scriptaculous/show/Sortable.create [2] http://wiki.script.aculo.us/scriptaculous/show/Draggable [3] http://wiki.script.aculo.us/scriptaculous/show/Droppables.add - -- Marius Feraru -----BEGIN PGP SIGNATURE----- iD8DBQFFZw7stZHp/AYZiNkRArx7AJ9+l0qclkGYGMsuTGEaEz7tvNhwcgCdGJK6 LWPutZGEvJGlb3RzjgaLV9o=Qale -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Possibly Parallel Threads
- cancelling droppable if draggable dropped on different droppable
- Scriptaculous, snap draggable to droppable or revert
- Another draggable/droppable performance booster
- Draggables and Droppable performance (tips)
- Drag and drop problem if Droppable zones overlap