I’m printing a web page using the code below:
window.print();
I want to execute a few commands after the Print dialog is closed. How can I detect it?
Advertisement
Answer
window.onload = PrintMe;
function PrintMe() {
window.print();
alert("Closed Printing");
}