php - Combine the aoData array from DataTables with the serliazed form -
i using jquery data table , want combine aodata form serialize data using jquery.
fnserverdata: function(ssource, aodata, fncallback,osettings) { aodata.concat( $("#frm").serializearray()); console.log(aodata); $.ajax( { "datatype": 'json', "type": "post", "url": 'ssource', "data": aodata, "success": fncallback } );
}
but doesn't combine , return data table's array response.
can please me out how can ?
thanks
table_obj = $('#group-table').datatable({ "sajaxsource": "url goes here", fnserverdata: function(ssource, aodata, fncallback,osettings) { aodata.push( $("#frm").serializeobject() ); console.log(aodata); $.ajax( { "datatype": 'json', "type": "post", "url": ssource, "data": aodata, "success": fncallback } ); }, aasorting: [[ 1, "desc" ]], bprocessing: true, bserverside: true, processing : true, rowcallback: function(row, data, dataindex){ // if row id in list of selected row ids if($.inarray(data[0], rows_selected) !== -1){ $(row).find('input[type="checkbox"]').prop('checked', true); $(row).addclass('selected'); } }, idisplaylength: '50', });
Comments
Post a Comment