TableTools copies but doesn't export to CSV / XLS / PDF

TableTools copies but doesn't export to CSV / XLS / PDF

drewtdrewt Posts: 22Questions: 0Answers: 0
edited December 2012 in TableTools
Hi Alan et al.,

I have a semi-working TableTools implementation that copies and goes to print view but does not save.

I get the 'Save' dropdown menu fine but all the are greyed out which has me thinking it may be a problem with CSS?

Site is using bootstrap 2.0.3, datatables 1.9.4, tabletools 2.1.4

Here's a debug code from the Firefox bookmarklet: http://debug.datatables.net/eyaqog

Here's my initialiazation from php:

[code]

$(document).ready( function() {
$('#phototable').dataTable( {
"sDom": "<'row-fluid'<'span6'T><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
"oTableTools": {
"sSwfPath": "<?php echo PATH_JS; ?>datatables/TableTools/media/swf/copy_csv_xls_pdf.swf",
"aButtons": [
"copy",
"print",
{
"sExtends": "collection",
"sButtonText": 'Save ',
"aButtons": [ "csv", "xls", "pdf" ]
}
]
}
});
});

[/code]

I know the SWF path is working because copying the table works fine. What am I missing?

Replies

  • drewtdrewt Posts: 22Questions: 0Answers: 0
    Also, I get no JavaScript errors in either Chrome console.

    By the way, thanks y'all!
  • nomadbakrnomadbakr Posts: 1Questions: 0Answers: 0
    Same here, none of the examples under \DataTables-1.9.4\extras\TableTools\ is working for me and no console errors as well and I've tried different browsers, still doesn't work.
  • drewtdrewt Posts: 22Questions: 0Answers: 0
    @nomadbakr:

    Did you set the SWF path? Do you see the buttons?
  • drewtdrewt Posts: 22Questions: 0Answers: 0
    Anyone have suggestions? Banging my head over this for days : (
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read

    Please link to a test case.

    Allan
  • drewtdrewt Posts: 22Questions: 0Answers: 0
    edited December 2012
    Hey Allan,

    Thanks so much for what you do. I can't believe how helpful you are to everyone.
    Here's a test case on js fiddle:

    http://jsfiddle.net/7mBf5/
  • drewtdrewt Posts: 22Questions: 0Answers: 0
    edited December 2012
    actually I realized you may get some weirdness in the fiddle because you're not logged in at our dev site. I hope it still works enough to show you how my save feature is looking though.
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Thanks for the JS Fiddle. It looks like the drop down menu doesn't have a high enough z-index. THe background has a z-index of 2001, while the drop down UL has a z-index of 1000. I'd suggest changing the UL z-index to 2002.

    Allan
  • drewtdrewt Posts: 22Questions: 0Answers: 0
    Ah, I see what mean (in my inspector). Thanks again Alan!
This discussion has been closed.