Joerg Beyer
2005-Aug-09 09:33 UTC
[Rails-spinoffs] how do I report the list order of a drag and drop list back?
Hello,
I try to report the new order of a list back to the server, after the
drag & drop is done, but I am not sure how to do it.
My ids are underscore separated like this:
<ul class="sortablelist" id="ja">
<li class="green" id="item_1">Item 1</li>
...
</ul>
I define the sortable like this:
Sortable.create("ja",
{
containment:["ja","jb"],
onUpdate:function(){
new Ajax.Updater(''list-info'',?
''/dnd/sortorder.py'')
}
}
);
there is a second ul, with the id="jb"
I get post request back to /dnd/sortorder.py, but without the new order.
Do I have to add Sortable.serialize(''ja'') to the
Ajax.Updater(...)?
How?
Thanks in advance
Joerg
