Table data with post
Table data with post
SeDo
Posts: 8Questions: 0Answers: 0
Hi,
First off, amazing script.
I'm using the download post + get method, http://datatables.net/extras/tabletools/plug-ins.
What I'm trying to do is to get this to a text file, every line has a column in the table:
1
00:01:02,425 --> 00:01:15,158
Lorem ipsum text...
These above information are in the table. I was able to send post parameters with the download post + get method, but how do I send the table data like in the above position?
Thx for looking into this.
My javascript code:
TableTools.BUTTONS.download = {
"sAction": "text",
"sFieldBoundary": "",
"sFieldSeperator": "\t",
"sNewLine": "
",
"sToolTip": "",
"sButtonClass": "DTTT_button_text",
"sButtonClassHover": "DTTT_button_text_hover",
"sButtonText": "Opslaan",
"mColumns": [ 0, 1, 2,4 ],
"bHeader": false,
"bFooter": false,
"sDiv": "",
"fnMouseover": null,
"fnMouseout": null,
"fnClick": function( nButton, oConfig ) {
var oParams = this.s.dt.oApi._fnAjaxParameters( this.s.dt );
var aoPost = [
{ "name": "naam", "value": "<?php echo $naam; ?>" }
];
var aoPost = [
{ "name": "data", "value": aoData }
];
var aoGet = [];
/* Create an IFrame to do the request */
nIFrame = document.createElement('iframe');
nIFrame.setAttribute( 'id', 'RemotingIFrame' );
nIFrame.style.border='0px';
nIFrame.style.width='0px';
nIFrame.style.height='0px';
document.body.appendChild( nIFrame );
var nContentWindow = nIFrame.contentWindow;
nContentWindow.document.open();
nContentWindow.document.close();
var nForm = nContentWindow.document.createElement( 'form' );
nForm.setAttribute( 'method', 'post' );
/* Add POST data */
for ( var i=0 ; i
First off, amazing script.
I'm using the download post + get method, http://datatables.net/extras/tabletools/plug-ins.
What I'm trying to do is to get this to a text file, every line has a column in the table:
1
00:01:02,425 --> 00:01:15,158
Lorem ipsum text...
These above information are in the table. I was able to send post parameters with the download post + get method, but how do I send the table data like in the above position?
Thx for looking into this.
My javascript code:
TableTools.BUTTONS.download = {
"sAction": "text",
"sFieldBoundary": "",
"sFieldSeperator": "\t",
"sNewLine": "
",
"sToolTip": "",
"sButtonClass": "DTTT_button_text",
"sButtonClassHover": "DTTT_button_text_hover",
"sButtonText": "Opslaan",
"mColumns": [ 0, 1, 2,4 ],
"bHeader": false,
"bFooter": false,
"sDiv": "",
"fnMouseover": null,
"fnMouseout": null,
"fnClick": function( nButton, oConfig ) {
var oParams = this.s.dt.oApi._fnAjaxParameters( this.s.dt );
var aoPost = [
{ "name": "naam", "value": "<?php echo $naam; ?>" }
];
var aoPost = [
{ "name": "data", "value": aoData }
];
var aoGet = [];
/* Create an IFrame to do the request */
nIFrame = document.createElement('iframe');
nIFrame.setAttribute( 'id', 'RemotingIFrame' );
nIFrame.style.border='0px';
nIFrame.style.width='0px';
nIFrame.style.height='0px';
document.body.appendChild( nIFrame );
var nContentWindow = nIFrame.contentWindow;
nContentWindow.document.open();
nContentWindow.document.close();
var nForm = nContentWindow.document.createElement( 'form' );
nForm.setAttribute( 'method', 'post' );
/* Add POST data */
for ( var i=0 ; i
This discussion has been closed.
Replies
Allan
How do I use fnGetTableData in a value?
{ "name": "data", "value": fnGetTableData(this doesnt work. I know, just pointing out) }
Allan
And is it possible to post 2 columns like this:
Column1 --> Column2
SeDo
Certainly - if you could pick up an hour of DataTables support ( http://datatables.net/support ) I'd be most happy to create a working example and explain it in detail.
Allan