TableTool buttons are not working

TableTool buttons are not working

BackyBacky Posts: 8Questions: 0Answers: 0
edited October 2013 in DataTables 1.9
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

Replies

  • lheredysazzelheredysazze Posts: 6Questions: 0Answers: 0
    edited October 2013
    There are three possibilities that from my experience will comprise almost all your problems:
    ---
    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
  • BackyBacky Posts: 8Questions: 0Answers: 0
    edited October 2013
    Thank you for the reply. I updated security settings for flash player as you described in point 1, but still clicking on button doesn't do anything. Only Print is working. Not any other button.
  • BackyBacky Posts: 8Questions: 0Answers: 0
    edited October 2013
    When I access this path "http://localhost:2447/Content/TableTools-2.1.5/media/swf/copy_csv_xls.swf" using my any of my browser, it doesn't show anything except an empty page. Should I expect to see anything if the path is correct? I have also installed shock wave player. I don't see any icon for swf file. Does that mean I am missing some installation?
  • BackyBacky Posts: 8Questions: 0Answers: 0
    I found the problem. Actually I have put more than one data tables under jquery tabs on the same page. Now It is working for only one table and not for other tables. Any suggestions ?
This discussion has been closed.