How is it possible to send a CSRF Token in jQuery TabledIt?
The following is my jQuery code for TabledIt:
$('#table').on('draw.dt', function(){
$('#table').Tabledit({
url:'url.php',
dataType:'json',
editButton: false,
deleteButton: false,
hideIdentifier: true,
columns:{
identifier : [0, 'id'],
editable:[[1, 'title']]
},
onSuccess:function(data, textStatus, jqXHR)
{
if(data.action == 'delete')
{
$('#' + data.id).remove();
$('#table').DataTable().ajax.reload();
}
}
});
});
I need to send CSRF token when TabledIt sends the table data to the server to delete or edit. How can I modify the above code to insert my CSRF token as well?
Thanks in advance.