I need a js code which will close window right after appearing of pop up print window. Here is my code:
P
In this way, the window will close after print, works perfect!
function printme() {
var newWindow = window.open();
newWindow.document.open("text/html");
newWindow.document.write('blablabla.......');
newWindow.document.close();
newWindow.print();
newWindow.onfocus = function () {
newWindow.close(); // Close the window
}
};