Hi everyone,
First of all, I'm french and I am not sure of my english level, so don't worry if I express myself strangely.
I am using Datatables with server-side mode, and I want to use TableTools to create a CSV.
With tabletools basic functions, I only can export the displayed rows and I want to export every data without pagination.
So I tried the "download button" plug-in to realize what I want.
To remember you, the download button code looks like :
The problem is that I had some parameters to datatables using "fnServerParams" and it seems like they don't appear in tabletools ajax url.
I've tried to had them directy in oParams in the fnClick function and it works perfecty. But I want to use directly the datatables "fnServerParams" method to modify oParams.
I've tried :
But the javascript console told me that "fnServerParams" is undefined as a function.
So how can I realize what i want to do ?
First of all, I'm french and I am not sure of my english level, so don't worry if I express myself strangely.
I am using Datatables with server-side mode, and I want to use TableTools to create a CSV.
With tabletools basic functions, I only can export the displayed rows and I want to export every data without pagination.
So I tried the "download button" plug-in to realize what I want.
To remember you, the download button code looks like :
TableTools.BUTTONS.download = { "sAction": "text", "sFieldBoundary": "", "sFieldSeperator": "\t", "sNewLine": "<br>", "sToolTip": "", "sButtonClass": "DTTT_button_text", "sButtonClassHover": "DTTT_button_text_hover", "sButtonText": "Download", "mColumns": "all", "bHeader": true, "bFooter": true, "sDiv": "", "fnMouseover": null, "fnMouseout": null, "fnClick": function( nButton, oConfig ) { var oParams = this.s.dt.oApi._fnAjaxParameters( this.s.dt ); var iframe = document.createElement('iframe'); iframe.style.height = "0px"; iframe.style.width = "0px"; iframe.src = oConfig.sUrl+"?"+$.param(oParams); document.body.appendChild( iframe ); }, "fnSelect": null, "fnComplete": null, "fnInit": null };
The problem is that I had some parameters to datatables using "fnServerParams" and it seems like they don't appear in tabletools ajax url.
I've tried to had them directy in oParams in the fnClick function and it works perfecty. But I want to use directly the datatables "fnServerParams" method to modify oParams.
I've tried :
"fnClick": function( nButton, oConfig ) { var oParams = this.s.dt.oApi._fnAjaxParameters( this.s.dt ); this.s.dt.fnServerParams(oParams); var iframe = document.createElement('iframe'); iframe.style.height = "0px"; iframe.style.width = "0px"; iframe.src = oConfig.sUrl+"?"+$.param(oParams); document.body.appendChild( iframe ); },
But the javascript console told me that "fnServerParams" is undefined as a function.
So how can I realize what i want to do ?