Display loading spinner under the button click event when the PDF export takes more than 10 seconds?
Display loading spinner under the button click event when the PDF export takes more than 10 seconds?
Venky1995
Posts: 14Questions: 9Answers: 0
I am trying to make a PDf and I have implemented all the features that we required with great ease. The only question that I am struggling with at the moment is the button click event takes more than a few seconds to complete the PDF Export. Now I understand that this works under the button event handler. But how would I handle this event between the start and end of the export process.
This discussion has been closed.
Answers
I have got this to change the data tables defaults to make it show a font awesome spinner:
This might work for your button as well if you turn on "processing":
You can also turn it on for your individual data table without changing the defaults.
If this doesn't work - and it might not - you would need to use something like "busyLoad". And find the suitable data tables events in the docs in order to use it ... Like in here:
This code shows a fuill screen spinner when the user selects a record and it hides the full screen spinner as soon as the drawing of the page has been completed.
https://piccard21.github.io/busy-load/
This thread might also help,
Colin
The piccard21 samples do not work in IE, only Chrome.
Just checked it with IE. Works fine! But maybe this is due to me using a polyfill which I strongly recommend to avoid trouble with IE.
This one is really good:
https://datatables.net/forums/discussion/comment/164504#Comment_164504