/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var hash = new String(); $.each(elements, function(k) { hash += this['id'] + 'weight: "' + k + '",\n'; hash += this['id'] + 'children: "' + this['children'].toString() + '",\n'; }); "if I print hash I get:" node1weight: "0", node1children: "node3,node4", node2weight: "1", node2children: "", node5weight: "2", node5children: "", "but the $_POST array in my php script is empty when using the following line:" $("#field1").load("/nodes/sort", hash);