DataTables TableTools buttons not working correctly (simple example)

前端 未结 3 982
心在旅途
心在旅途 2020-12-11 22:24

I am trying to use the newest tableTool 2.2.0 and i have made a little and simple example jsfiddle.net/9ZTGb/

COPY and PRINT buttons seems to respond, but the \"Copy

相关标签:
3条回答
  • 2020-12-11 22:49

    An answer to getting the Copy/CSV/Excel/PDF buttons working is provided here.

    Essentially, a cdn library is referenced instead of the local swf file. Change your swf path code to:

            "tableTools": {
                 "sSwfPath": "//cdn.datatables.net/tabletools/2.2.2/swf/copy_csv_xls_pdf.swf"
        }
    

    This, along with the standard initialization, worked for me.

    0 讨论(0)
  • 2020-12-11 22:51

    Maybe it would be useful. I implemented extention just for exoprting tables in csv format without using flash: https://github.com/zedxter/DataTablesCSV

    0 讨论(0)
  • 2020-12-11 22:55

    sSwfPath : Flash file Security is the Issue:

    Solution:

    Step 1: Check For sDom Property.

    Step 2: Check the SWF Path is correct. If its correct

    Step 3: Open Flash Manager :

    http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html

    Under 3rd Tab, Global Settings Add the Site Url Which contains SWF Path. Select Always Allow Option.

    Then Try the Save PDF By Refresh.

    0 讨论(0)
提交回复
热议问题