Hi,
I am using the $ajax->sortable function to change the order of a list (3
items).
Then I want to save the order in a database but I have a problem.
When I use Sortable.serialize to send the data to my controller, my
array is empty...
Here is the code I use in my view :
<?php echo $ajax->sortable("sortable_list", array('handle' =>
'title_rbox', 'constraint' => 'false', 'onChange' => '
function() {
new Ajax.Request("/users/ajaxorderlist", {
method: "post",
parameters: { data:
Sortable.serialize("sortable_list") }
})
}
'));
?>
The POST['data'] I receive in my controller is :
sortable_list[]=&sortable_list[]=&sortable_list[]=
I don't understand why I don't have the id of the different item, like
that : sortable_list[]=item_2&sortable_list[]=item_1&sortable_list[]=item_3
I did not find out the answer of my question on Google, so if someone
has an idea ?
Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---