What result AJAX edit expectes?
What result AJAX edit expectes?
Hello,
I have set AJAX function inside the editor options like this
ajax: {
edit: {
type: 'POST',
url: functionsPath,
data: function(d) {
var newdata;
$.each(d.data, function (key, value) {
newdata = value;
newdata.order_id = key;
});
newdata.action = "updateOrderDetails";
return newdata;
}
},
}
Then I'll use PHP to update MySQL table.
$updateDetails = $db->prepare("UPDATE orders_data SET ...")
Everything seems to be that are working, but I am getting this one error everything nevertheless when everything is working.
A system error has occurred (More information).
Console is quiet aswell as Network tab.
This discussion has been closed.
Answers
Okay I got it.
On create: Data of the added / edited row(s)
On edit: Data of the added / edited row(s)
On remove: Not used / not required
So when I edit row I need to return new row data back.
Hi @Jaakko ,
Glad you worked it out, and yep, that all looks good.
Cheers,
Colin