TableTools export in JQuery Datatables not working

前端 未结 1 1355
时光说笑
时光说笑 2021-01-22 12:28

I\'ve been struggling with this for two days. I\'ve posted on the datatables forum but I\'ve gotten no response so I\'m hoping the community here can help. I\'ve read similar p

相关标签:
1条回答
  • 2021-01-22 12:37

    Your code is correct and matches the TableTools example. The issue is related to loading external SWF file, it doesn't work when code is loaded in <iframe> (as in your JSFiddle example) or when loaded from file on your computer using file:// protocol due to security restrictions.

    The solution is to upload your code to a web server and it should work without any changes.

    Alternatively, if you want it to work locally on your computer, you need to use relative path to copy_csv_xls_pdf.swf. For example save copy_csv_xls_pdf.swf along with your page and use "sSwfPath": "copy_csv_xls_pdf.swf".

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