This was working previously because you were using a different data  
model for the return value of your serialise() method.  
Sortable.serialize() returns an array as a single value, and if you  
add that to the GET that is sent to your server, it will be  
interpreted by PHP on the receiving end as an Array(). Where you  
currently are using `$newOrder = explode('_', $order);`, simply do  
this $newOrder = $_GET['order']. If you inspect $newOrder on the  
server side, it will be:

Array(
        0 => '2',
        1 => '1',
        2 => '3'
)

...assuming that you followed the ID rules noted previously, and that  
you appended the updated order using this sort of syntax:

new Ajax.Request('your_server.php,{parameters:  
{order:Sortable.serialize('your_list')}});

In testing this out, I realize that I made an error previously. I had  
said that you could use this syntax:

var foo = Sortable.create('some_list',{});

and later foo.serialize() would return the result. Not so (although it  
occurs to me that it might be easy to add).

Sortable.serialize('some_list') will actually return the array with  
the current list order.

Walter

On Feb 23, 2009, at 10:26 AM, vanq69 wrote:

> I have tried several different versions of this, the one you see is
> the one that worked previously before I added the other text, it is
> also very similar to the tutorial.
>
> Any further help would be greatly appreciated, I can email the files
> if its easier to see that way and you have the time.


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

Reply via email to