Serialize datatable inputs generated with Ajax
Serialize datatable inputs generated with Ajax
euloko
Posts: 2Questions: 2Answers: 0
I have a table like this:
$(document).ready(function(){
var table=$('#example').DataTable({
"ajax":{"url":"someurl.org"},
"columns":[{"data":"something",function(data){ return "<input type='checkbox' name="name[]">"}}]
});
$('button').click(function()){
var data = table.$('input').serialize();
console.log(data);
}
});
It does trigger the console.log but it doesn show me the values of the inputs.
I do the exact same as: https://datatables.net/examples/api/form.html except that Im using Ajax data and the example uses HTML.
How do I fix that the variable data actually gets the value in it?
This discussion has been closed.