using fnServerdata is making mutiple ajx requests.

using fnServerdata is making mutiple ajx requests.

Poo123Poo123 Posts: 2Questions: 2Answers: 0

Here is my code. Please help
var table = $('#tableContent').dataTable({
"bServerSide": true,
"sAjaxSource": "ajax/pfmcmdlogListDataTable",
"bProcessing": true,
"pageLength": 50,
"bFilter":false,
"bDestroy":false,
//"sPaginationType": "full_numbers",
//"bJQueryUI": true,
"dom": '<"top"i>rt<"bottom"flp><"clear">',
"fnServerData": function ( sSource, aoData, fnCallback ) {
aoData.push( { "name" : "methodName", "value" : $("#methodName").val() } );
aoData.push( { "name" : "objectName", "value" : $("#objectName").val() } );
aoData.push( { "name" : "operatorName", "value" : $("#operatorName").val() } );
aoData.push( { "name" : "parameters", "value" : $("#parameters").val() } );
aoData.push( { "name" : "providerGroup", "value" : $("#providerGroup").val() } );
aoData.push( { "name" : "result", "value" : resultVal } );
aoData.push( { "name" : "serviceName", "value" : $("#serviceName").val() } );
aoData.push( { "name" : "cpuTime", "value" : $("#cpuTime").val() } );
aoData.push( { "name" : "dateStart", "value" : $("#dateStart").val() } );
aoData.push( { "name" : "dateEnd", "value" : $("#dateEnd").val() } );
aoData.push( { "name" : "timeStart", "value" : $("#timeStart").val() } );
aoData.push( { "name" : "timeEnd", "value" : $("#timeEnd").val() } );
aoData.push( { "name" : "bitMap", "value" : bitMap } );
aoData.push( { "name" : "sqlCriteria", "value" : $("#sqlCriteria").val() } );
$.ajax({
"dataType": "json",
"type": "POST",
"url": sSource,
"data": aoData,
"success": fnCallback,
"error": function(jqXHR, textStatus, errorThrown) {
console.log(txtStatus, errorThrown); // use alert() if you prefer
}
});

                }                              


            });
This discussion has been closed.