TableTool buttons are not working
TableTool buttons are not working
Backy
Posts: 8Questions: 0Answers: 0
Hi,
I am using DataTable 1.9.4 with TableTools 2.1.5. None of my buttons(Excel,Copy,Csv) are working except Print. When I click on button , it simply doesn't do anything ...not returning any error...I am specifying correct "sSwfPath": "http://localhost/Content/TableTools-2.1.5/media/swf/copy_csv_xls.swf". I don't know why it is not working. Please give me any suggestion to make it work.
Thanks
I am using DataTable 1.9.4 with TableTools 2.1.5. None of my buttons(Excel,Copy,Csv) are working except Print. When I click on button , it simply doesn't do anything ...not returning any error...I am specifying correct "sSwfPath": "http://localhost/Content/TableTools-2.1.5/media/swf/copy_csv_xls.swf". I don't know why it is not working. Please give me any suggestion to make it work.
Thanks
This discussion has been closed.
Replies
---
1) You are working locally and need to update your flash security settings.
2) SELinux is preventing access to your file system by a plug-in.
3) You are calling .dataTable(options) on a table that is not visible!
---
---
1) You are working locally and need to update your flash settings.
---
If you are working locally, you'll have to update your flash settings. You may want to refer to this page to change your local flash settings:
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
---
2) SELinux is preventing access to your file system by a plug-in.
---
Are you using Linux? Try checking your SELinux settings. SELinux had prevented all my browsers from saving/copying information. (during file save, it would create an empty file on my file system and then the plugin would crash). I suppose Windows Defender may have similar effects, or additional Flash security settings.
To check your SELinux settings, try running:
sestatus
You should see SELinux status: disabled or SELinux status: enabled.
if it's enabled, run the following to disable it*(disclaimer below):
sudo setenforce 0
sestatus
Now SELinux should be disabled.
*(disclaimer): Note that SELinux is a built-in security system of some kind and by disabling it you are exposing yourself to whatever it is SELinux protects you from, and that you do so at your own risk!
---
3) You are calling .dataTable(options) on a table that is not visible!
---
Using 'display: none' to hide the table data will cripple the TableTools plug-in!
You need to have your table data visible when running $('.dataTable').dataTable(options);.
If you insist on hiding the table data, you'll either have to show the table by default and use jQuery to hide the table after running .dataTable(),
OR
the other way: running .dataTable only when the toggle link is clicked, in which case you may want to put test for if($.fn.dataTableSettings.length==0){.dataTable();} to prevent being alert()ed for trying to re-initialize dataTables.
If you need to you can set $.fn.dataTableSettings.length=0; which will let you reinitialize without getting an error, which works swimmingly if you only have one table on the page.
If you have several tables using dataTables you may want to check to see if a particular table is initialized using code like the one provided in this forum post to test:
http://datatables.net/forums/discussion/comment/18981
---
I hope this helps! I just discovered all this in the last two days. Hopefully it saves you (and others!) some time!
Note that I had to fix #2 and #3 before seeing any results, so don't get discouraged if doing one of them doesn't work.
---
Laszlo