I use the JQuery DataTables plugin and I initialize it with ajax parameter.
I'll need to calcolate new parameter when I reload data but not run if I pass parameter in the function. I call the ajax.reload from a "Reload" button. Why I can not use function with parameter?
// Run correctly
function loadData(){alert("called");}
tab=$("#tabID").DataTable({ajax:{url:"a.php",data:loadData}}); // The "loadData" is called
...
$("#tabID").DataTable().ajax.reload(); // The "loadData" is called again
// Problem
function loadData(A){alert("called with "+A);}
tab=$("#tabID").DataTable({ajax:{url:"a.php",data:loadData("text")}}); // The "loadData" is called
...
$("#tabID").DataTable().ajax.reload(); // The "loadData" is NOT called... why?
Thank's