I am trying to catch the Print Dialog popup via JavaScript in a .NET Web App. I can catch the print button click by adding an event listener like this:
document.getElementById("CrystalReportViewer1_toptoolbar_print").addEventListener("click", function () {
//run some code here
return false;
});
I am displaying a "please wait" message and making the webpage disabled in the "//run some code here" section. But, after the user clicks Print or Cancel, I need to hide the "please wait" and enable the webpage. I tried to catch the "afterprint" event, but no luck.
Anyway to do that in JavaScript?