Trouble with fnServerParams on server side processing

Trouble with fnServerParams on server side processing

taorippletaoripple Posts: 1Questions: 1Answers: 0

DataTables debugger code = uculur

I've used fnServerParams successfully before, but I cannot find the bug in my code. Here's the snipped that produces the last table in the debugger (listInstrumentIssues):

I've only posted once or twice, so apologies if I'm not asking in the correct place.


//setup page title, with the parameters being passed var $pageTitle = $('#pageTitle'); var title = 'All equipment issues for ID: ' + $labBenchInstrumentID.val() + ' From: ' + $fromDate.val() + ' To: ' + $toDate.val() $pageTitle.html(title); //alert($pageTitle.text()) //setup hidden params var $listInstrumentIssues = $('#listInstrumentIssues'); $listInstrumentIssues.dataTable({ "bDestroy":true, "bStateSave": true, "aaSorting": [[0, "asc"]], "bProcessing": true, "bServerSide": true, "sAjaxSource": "Admin_InstrumentIssueReviewTable.asp", "fnServerParams": function ( aoData ) { aoData.push( {"name": "labBenchInstrumentID", "value": $labBenchInstrumentID.val() }, {"name": "fromDate", "value": $fromDate.val() }, {"name": "toDate", "value": $toDate.val() }, {"name": "campusID", "value": $campusID.val() }, {"name": "campus", "value": $campus.val() }, {"name": "reviewFilter", "value": jQuery('input[name=reviewStatus]:checked').val() } ); }, "bJQueryUI": true, "bAutoWidth": false, "bFilter":true, "bLengthChange": true, "bPaginate": true, "bSort": true, "iDisplayLength": 10, "bInfo": true, "aoColumnDefs": [{ "targets": 8, "data": null, "mRender": function (data, type, full) { return "<a href='#' class='issueSubEdit iconEdit' id='issueTypeID_"+ full[0] +"'></a>" } }], "drawCallback": function() { $(".iconEdit").on("click", function(e) { e.preventDefault(); var row = $(this).parents("td")[0]; var pos = $listInstrumentIssues.fnGetPosition(row); var obsID = $listInstrumentIssues.fnGetData(pos[0])[0]; //alert(obsID); //id works, then get html to mark as reviewed and set comment /* $listDetail.dialog({ close: function(event, ui) { $listIssueType.fnDraw(false); }}); openListDetail(obsID,'listIssueType'); */ }) }, "sPaginationType": "full_numbers" }); //review status filter change function var $reviewStatus = $('#reviewStatus').buttonset().change(function() { $listInstrumentIssues.fnDraw(false); }); $reportBox.dialog('option',{ 'buttons':{ 'Close': function() { $reportBox.dialog('close') } } }); //close filter box $filterBox.dialog('close'); //open $reportBox.dialog('open'); });
This discussion has been closed.