TableTools swf don't work

TableTools swf don't work

acamusacamus Posts: 3Questions: 0Answers: 0
edited June 2012 in TableTools
Hi,

First, i'm sorry for my english... i'm french... :)


Nothing happens when i click on cpy-xls-csv-pdf buttons.
I have already check my sSwfPath. I haven't got 404 error.

Here, my code in the "ready" function :
[code]
$('#demo').append('' );
$('#exemple').dataTable( {
"sDom": 'T<"clear">lfrtip',
"aaData": val.infos,
"aoColumns": (val.type=='WRF' ? clnWRF : clnCP),
"oTableTools": {
"sSwfPath": "./js/TableTools/media/swf/copy_csv_xls_pdf.swf",
"aButtons": [
"copy",
{
"sExtends": "csv",
"sTitle": val.legend.replace(/ /g, '_')
},{
"sExtends": "xls",
"sTitle": val.legend.replace(/ /g, '_')
},{
"sExtends": "pdf",
"sTitle": val.legend.replace(/ /g, '_')
},
"print"
]
}
});
[/code]

And in the i have :
[code]








[/code]

The variable 'val' is a JSON and the datatables works. The "print" button works too.

What is wrong in my code ? Can you help me ?

Replies

  • Taylor514ceTaylor514ce Posts: 74Questions: 8Answers: 0
    With TableTools, I encountered the following issues:

    The SWF path didn't work for me as a relative path, I had to specify the complete URL.

    The SWF buttons didn't work if the table was initially hidden, either within a jQuery UI tab or accordion, and to fix I had to call the fnDraw function. I have since modified so that I have only a single datatable and it is in a Tab that is initially visible.
  • acamusacamus Posts: 3Questions: 0Answers: 0
    Thanks Taylor,
    it's probably because a use tabs... But the fnDraw don't fix it !

    Where do you used it ?
  • Taylor514ceTaylor514ce Posts: 74Questions: 8Answers: 0
    There are several threads on this topic. I recommend this one:

    http://www.datatables.net/forums/discussion/5859/tabletool-problem-when-hiding-datatable_wrapper/p1
  • acamusacamus Posts: 3Questions: 0Answers: 0
    Perfect, thanks a lot !
This discussion has been closed.