I have tried to convert the below datatable javascript from GET to POST method. The code looks as below,
var pagination = new DatatablesPagination({
tableSelector: '.casesTable',
tableContainer: data.tableContainer,
onError: callbacks.onError,
iDisplayLength: recordsPerPage,
pages: 4,
sAjaxSource: ajaxSource,
fnServerParams: function(aoData) {
$.each(additionalQueryParams, function(index, additionalQueryParam) {
aoData.push(additionalQueryParam);
});
},
fnDrawCallback: function(settings) {
if (typeof callbacks !== "undefined" && typeof callbacks.onDrawOfAssociatedCases !== "undefined") {
callbacks.onDrawOfAssociatedCases(settings, reportHolder);
if ($("#associatedCasesTableWrapper").is(":visible")) {
updateLocation();
}
}
}
}):
I have tried adding sServerMethod: POST as below, but there is no luck.
sServerMethod: 'POST',
sAjaxSource : ajaxSource,
fnServerParams : function ( aoData ) {
$.each(additionalQueryParams, function(index, additionalQueryParam) {
aoData.push( additionalQueryParam );
});
},
Could anyone help me to convert this method from GET to POST please?
consoleerror your are getting innetwork?