Add event on excelHtml5 button
Add event on excelHtml5 button
Hello everyone,
I need to add a listener to an excelHtml5 button when the action (save file or cancel) is finished.
I use it in an ERP, not in a browser, so I don't have any feature of any browser. just html/javascript .
I found fnComplete :
https://stackoverflow.com/questions/26979826/i-need-an-event-fired-after-successful-export-on-datatables-1-10
but it seems it does not apply to excelHtml5 Button.
I also found a 2016 thread that said this feature may be implemented in the future (don't have the link anymore) ...
Is there any solution or workaround to do this ?
thanks
This question has an accepted answers - jump to answer
Answers
Hi @credel ,
Unfortunately not, it's still in the backlog.
Cheers,
Colin
This is where any such callback would need to do (JSZip 2.5 probably has a different API for it). So it isn't present at the moment, but could readily be implemented if you want to.
Allan
Thank you very much for your help.
I'm a complete beginner in web dev/JS so I have no idea how to implement it. Would you have an example on how to 'add' this event management so I can use it ?
Does this kind of lines of code would be ok ?
var event = new Event("FileSaved");
node.dispatchEvent(event);
I'd add
if ( config.finished ) { config.finished(); }
then you can add afinished
function to your configuration for the button.Allan
Ok thank you