Trying to use fnServerParams and fnDrawCallback in same datatables object call

Trying to use fnServerParams and fnDrawCallback in same datatables object call

imclean42dayimclean42day Posts: 1Questions: 0Answers: 0
edited September 2012 in DataTables 1.9
ok, first off, great plug in
here is my problem. i am trying to send additional variables to my processing script and trying to bind links with a callback function.
here is my code
[code]
$(function() {
$('#staff').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "../.scripts/server_processing.php",
"fnServerParams": function ( aoData ) {
aoData.push( { "name": "phase", "value": "<?php echo $this_phase ?>" } );
"fnDrawCallback": function( oSettings ) {
$('a.popup').click(function(){
newwindow=window.open($(this).attr('href'),'Edit Application','height=600,width=850,scrollbars=yes, toolbar=yes,left=0,top=0;menubar=yes');
if (window.focus) {newwindow.focus()}
return false;
});
}
} );
} );
[/code]
wot the puck am i doing wrong???
either one works fine but both do not work at all
any help would be greatly appreciated

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    You've got a Javascript syntax error. Does your web-browser's Javascript debugger not tell you that?

    You are missing the closing bracket and a comma at the end of the fnServerParams function.

    Allan
This discussion has been closed.