I need a js code which will close window right after appearing of pop up print window. Here is my code:
P
Print
function print()
{
win = window.open();
win.document.write('blablabla.......');
var document_focus = false; // var we use to monitor document focused status.
// Now our event handlers.
$(document).ready(function() { win.window.print();document_focus = true; });
setInterval(function() { if (document_focus === true) { win.window.close(); } }, 300);
}
Thanks Stilltorik for link.