I am using dataTables and want to include a checkbox that will update my data when changed (select, deselect). The data is displayed in the table with the checkbox on each row; however:
- this.checked is not recognised (returns 'undefined'); and
- When I select or deselect a checkbox I get an error in the console log: Uncaught SyntaxError: Unexpected token ','
The code is:
{data: null,
className: "center",
render: function(data,type,row) {
return ("<input type='checkbox' id=" + data.cdId + " name='update' onchange='ymActivityPatrolFunction(" + data.cdId + ", " + this.checked + ")' style='zoom: 2.0;'>")
},
},
Which gives: