Datatables export button action not working
Datatables export button action not working
Hello,
I'm having similar problems to those who comment on the following stackoverflow question:
http://stackoverflow.com/questions/44018716/datatables-export-button-not-working
The image of the error that appears to me is the same as the one that appears in stackoverflow question:
It looks like the error can be in datatable.buttons.js or in buttons.html5.js.
I have debugged the code and in line 1014 of buttons.html5.js this.processing function is not defined.
I have tried to comment that line and the other calls to this.processing function and everything is going well, it looks like a bug. I'm working with version 1.3.1 of Datatable buttons.
It seems that the actions of the buttons html5 does not have access to the methods of Buttons.
Could anyone check this out?
This is the fiddle that appears in stackoverflow question:
Thanks and sorry by my english.
This question has an accepted answers - jump to answer
Answers
try this:
Hello bindrid,
firs of all, thanks for your reply.
Your solution does not work for me, because I don't need to change export extension. I've show the fiddle because the error is the same that mine, but in my code I need to update data in datatable using an ajax request, and after, call to the export button action, and in this call is where is the problem.
Any suggestion?
Did you hit run after you pasted it in? I tested it in your fiddle with my console open. I get no errors. From what I see, you are only doing this so you can set the exportExtension value.
Its a scoping issue. See this thread for my explanation and and example showing it resolved from someone else who asked the same thing.
Allan
Thank you very much to both, it works for me.