Hey guys,
I have the option to delete records from a datagrid. It gets a bit tedious when it comes to deleting multiple records. I have set the datagrid up with check boxes to appear, and can multi select them. The next part is where I get stuck. Is there a way that I can put the values into an array and send via AJAX to a php file? Could you help me with that?
Thanks,
EDIT:
So far I have tried to reuse a function found in one of the tutorials:
function test() {
var ids = [];
var rows = $('#dg').datagrid('getChecked');
for(var i=0; i<rows.length; i++){
ids.push(rows[i].id);
}
alert(ids.join('\n'));
}
This seems like it should work, but the alert box is empty. If I could fill it, I could then use the loop to do multiple AJAX calls, unless there is a more sensible way?