Instead of using the cakephp $ajax object, why not try just using the
Sortable in scriptaculous first?
example:
<ul id="page_list">
<?php
foreach ($items as $item) {
?>
<li class="sortable_list" id="List_<?php echo
$item['Item']['id']?>">
<?php echo $item['Item']['name']?>
</li>
<?php
}
?>
</ul>
<script type="text/javascript">
Sortable.create('page_list' , {
onUpdate: function() {
new Ajax.Request('/items/saveItems/' , {
method: "post",
parameters:
{data:Sortable.serialize('page_list')},
onSuccess: function() {}
});
}
});
</script>
that should work just fine
var_dump($_POST);
I gets :
string(84)
"page_list[]=4&page_list[]=51&page_list[]=3&page_list[]=6&page_list[]=2&page_list[]=8"
:-D
--
View this message in context:
http://www.nabble.com/Problem-on-serializing-Ajax-data-with-Cake-tp16748571p17586909.html
Sent from the CakePHP mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---