I was trying to use jQuery UI Nested Sortable 1.2.1 from http://mjsarfatti.com/sandbox/nestedSortable where it prepares a javascript array as
ret.push({"id": id, "par_id": pid, "title": title, "depth": depth, "left": left, "right": right});
I have tried to send that data through a hidden field as
<input id="menuArray" name="menuArray" type="hidden" value="" />
$('#submit').click(function(){
var ma = $('ol.sortable').nestedSortable('toArray');
$("#menuArray").val(ma);
$('form#target').submit();
});
However, when I do
echo '<pre>';
print_r($_POST['menuArray']);
echo '</pre>';
All I get is:
<pre>[object Object],[object Object],[object Object] ...</pre>
Any solution / tips / hints friends?