I have a small app using sortables where you can re-order within them
but also drag them between different sortables, saving both position
within and which sortable they are in to a db.

My problem: getting the order within each sortable is passing ok but I
can't find the way to get the id of the sortable to pass.

For example, the sortable is created as so:
<script type="text/javascript">
        // <![CDATA[
        Sortable.create('group_1',{tag:'div',dropOnEmpty: true, containment:
        Sortable.create('group_'2',{tag:'div',dropOnEmpty: true, containment:
        // ]]>

Then when drag/drop the JS is activated:
        function updateList(container) {
                var url = 'ajax.php';
                var params = Sortable.serialize(container.id)
                var ajax = new Ajax.Request(url,{
                        method: 'post',
                        parameters: params,

This calls the Ajax which uses:

This passes all the group1[]=1 info ok. I just can't figure out how to
have that Ajax use something like $demo->updateList($_POST
[$x_groupvariable]); since I can't figure out how to assign the id of
the sortable. Any help would be supremely appreciated.


You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to