Server side sent extra parameter

Server side sent extra parameter

hafizanhafizan Posts: 2Questions: 1Answers: 1

var t = $('#userTable').DataTable( {
"processing": true,
"serverSide": true,
"ajax": "${pageContext.request.contextPath}/ajaxTestTable",
"data": function ( d ) {
d.myKey = "myValue";
},
"columns": [
{ "data": "totalUser" },
{ "data": "fullname" },
{ "data": "username" },
{ "data": "ministryid" },
{ "data": "gradeid" },
{ "data": "officeemail" }
],
"columnDefs": [ {
"searchable": false,
"orderable": false,
"targets": 0
} ],
"order": [[ 1, 'asc' ]]
} );

I try to send extra parameter. It doesnt work, when i try open console on browser it will said "TypeError: data is undefined if ( data.DT_RowId ) {".

What did i do wrong?

This question has an accepted answers - jump to answer

Answers

  • hafizanhafizan Posts: 2Questions: 1Answers: 1
    Answer ✓

    I already resolve this. data is a object not a function. Sorry guys

This discussion has been closed.