I have a small question as follow: I have a function that it takes on values input and returns JSON string. In my function GET_PRODUCT input a parameter as string @product_name . The result as JSON , I do not know how to pass parameters in here . I must declare how do use dataSrc in here (suppose webmethod GET_PRODUCT is work with parameter input )
var table;
table = $('#div_table').DataTable({
"processing": false,
"serverSide": false,
"ajax": {
"url": "../BUS/WebService.asmx/GET_PRODUCT",
"dataType": "json",
"contentType": "application/json; charset=utf-8",
"type": "POST",
dataSrc: function (json) {
//dataSrc: function (json(Candy)) {
//transfer parameter in here
//result as JSON string will parsed and fill in DataTables
return $.parseJSON(json.d);
},
//dataSrc: "Candy",
},
I do not understand the issue pass parameters in here. Please share with me. Thank guys.