Server Side processing with GET variables - feasible ?

Server Side processing with GET variables - feasible ?

jeanpaul2777jeanpaul2777 Posts: 5Questions: 0Answers: 0
edited July 2012 in General
Hello everyone,

my problem might be trivial but I am a beginner in programming...
I am working on a website combining Php, Mysql and Datatable :-)
I would like to know if this is possible to call within javascript the entry_server_processing.php file with an ID variable received from GET method. I am trying to use fnServerData but I think my approach is wrong. entry_server_processing.php is exactly like the one on the website. (with my own params).

My second question is optimization related. My table has 17000 rows, if I try to use filters, the page freeze. Is there any way to avoid that issue?

Thank you very much for any suggestion.

[code]



<?php $ID_entry=$_GET['var'];?>




@import "/datatable/media/css/demo_page.css";
@import "/datatable/media/css/demo_table.css";

<!link type="text/css" href="/datatable/media/css/redmond/jquery-ui-1.8.21.custom.css" rel="Stylesheet" />








$(document).ready(function() {
var oTable = $('#example').dataTable( {
"bJQueryUI": true,
"bStateSave": true,
"sPaginationType": "full_numbers",
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "\php\entry_server_processing.php",

"fnServerData": function ( sSource, aoData, fnCallback ) {
aoData.push( { "name" : "GENE_ID", "value" : <?php $entry?> } );
$.getJSON( sSource, aoData, function (json) {
fnCallback(json);
});
},
"sDom": 'T<"clear"><"H"lfr>t<"F"ip>',
"oTableTools": {
"sSwfPath": "/datatable/extras/TableTools/media/swf/copy_csv_xls_pdf.swf"
},
"aoColumnDefs": [
{ "fnRender": function ( oObj ) {
return 'ENSMUST'+oObj.aData[0]+''; },
"mDataProp": null,
"sDefaultContent": "Edit",
"sClass": "my_class",
"aTargets": [0]
}
],
"fnDrawCallback": function () {
$('td.test').editable( '\php\entry_drug_edit.php', {
"callback": function( sValue, y ) {
/* Redraw the table from the new data on the server */
oTable.fnDraw();
},
"height": "14px"
} );
}
});
$("#example").dataTable().columnFilter( {
aoColumns:[
null,
{type: "text"},
{type: "text"},
{type: "number-range"},
{type: "number-range"},
null,
null,
{type: "select", values:['0','1']},
]}
);
});
[/code]
This discussion has been closed.