Trying to use fnServerParams and fnDrawCallback in same datatables object call
Trying to use fnServerParams and fnDrawCallback in same datatables object call
imclean42day
Posts: 1Questions: 0Answers: 0
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
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
This discussion has been closed.
Replies
You are missing the closing bracket and a comma at the end of the fnServerParams function.
Allan