Tabletools Installation
Tabletools Installation
Hi everybody!
I want to try the lovely Tabletools plugin but I don't know how to install it.
Where should I decompress and place the files?
The only thing to do next is:
$(document).ready( function () {
$('#example').dataTable( {
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "/swf/copy_csv_xls_pdf.swf"
}
} );
} );
Putting in path the correct path.
Is this everything?
I've tried it but probably I need to place and name the folders differently because it didn't work.
Thanks for your time!
I want to try the lovely Tabletools plugin but I don't know how to install it.
Where should I decompress and place the files?
The only thing to do next is:
$(document).ready( function () {
$('#example').dataTable( {
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "/swf/copy_csv_xls_pdf.swf"
}
} );
} );
Putting in path the correct path.
Is this everything?
I've tried it but probably I need to place and name the folders differently because it didn't work.
Thanks for your time!
This discussion has been closed.
Replies
Allan
I have just downloaded DataTables-1.9.4.zip, I've put it in my site's root folder...
I've unzipped it so the final look is:
/var/www/mysite/tabletools
I've searched without luck for the extras folder.
Should I create the extra folder and download tabletools separately and extract it in the extra folder?
Allan
Take a look at this.
http://datatables.net/usage/
and this.
http://datatables.net/release-datatables/examples/basic_init/zero_config.html
This should get you going.
Cheers...
Sorry: while braindead I downloaded the wrong file :)
Now everything is in place and finally the "Print, Pdf" and so on appeared on the page.
I've put in the head section of my html:
/script>
and corrected accordingly the init:
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "datatables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf"
},
But the nasty thing still won't work.
The "Print, copy, export to excel" and so on buttons look like plain text so I must be still missing something...
I'll fiddle some more and then write back with a complete howto for future (and braindead) users :)
@jhcompute
Hi and thanks for help!
My basic configuration should be ok because my datatables are showing up nice and work perfectly.
All I wanted to add is the pdf and excel export.
Anyway I'm checking your links now: thanks :)
Allan
I love it! :D
So here's the complete procedure to install tabletools for datatables, merging your kind suggestions and my trial and error:
a) Download from here (http://datatables.net/download/) the complete package and decompress the folder and rename it as you prefer (I called mine datatables and copied it in my site root therefore all the paths you'll find here are simply mine: change yours accordingly to where you places your decompressed folder)
b ) Prepare your html and javascript following the basic examples here:
http://datatables.net/usage/
and here:
http://datatables.net/release-datatables/examples/basic_init/zero_config.html
c) Once you have your datatables up and running add to your html file head section:
and finally:
d) Initialize your datatables with tabletools:
$(document).ready( function () {
$('#example').dataTable( {
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "/swf/copy_csv_xls_pdf.swf"
}
} );
} );
Have fun and enjoy this lovely plugin.
Thanks again to Allan and Jhcompute for their time and patience.