Button.html5: Uncaught TypeError: this.processing is not a function
Button.html5: Uncaught TypeError: this.processing is not a function
sanglanun
Posts: 5Questions: 2Answers: 0
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi bindrid, thanks for the comment but I know this one. Actually there is other variable also will change depend on the button event. I have update the jsfiddle with the new code.
It sounds like you might be using a new version of the HTML5 buttons file without a new version of the Buttons core. Could you make sure you are using Buttons 1.3.1 please?
Allan
Hi Allan, I already using all new version from nightly version. You can see it in this link. Maybe I miss some of the file?
Thanks. Sorry I missed the JSFiddle above.
The issue is that you aren't telling the
action
method what Buttons instance should be used - i.e. its a scope change.Using
Function.prototype.call()
to make sure it executes in the current scope resolves the issue: https://jsfiddle.net/sbcuzoy8/8/ .Allan
Thanks Allan, it works, you make my day
Hi, you could upload jsfiddle again?, i have a same problem.
Thanks!
I've since added the last example on this page:
buttons.buttons.action
which might help you. If not, I'd need to see your code - it looks like the original author has removed the JSFiddle.Allan
it works, thanks Allan!
Hi Allan, can you help me with the same issue?
Here is my code:
Here is the screenshot of the error http://prntscr.com/l71x8p
And screenshot from datatables code where the error fires http://prntscr.com/l71xrd
Both JS and CSS code taken from the CDN http://prntscr.com/l71y1b
Seems the cause is setTimeout. But I need to export 500-1000+ rows and window is just freezing when I clicking Export button. And this is the only way I found to have some loading animation. Is there a way to keep the animation and not editing the DataTables code?
Can you using Buttons 1.5.4 if you aren't already?
Allan
I am using Buttons 1.5.4. http://prntscr.com/l75dm7
If I remove setTimeout its ok. But I didnt find other way to have loading animation.
Ah I see. Your
setTimeout
is changing the scope. You need to use:Allan
Right
Thanks Allan!