I have an HTML-page with some data in table format, and this code:
function printme() { window.print(); self.close(); } <body onload = "javascript:printme()">
With this, I can get printout from all browsers except one version of IE8 (8.0.7601.xxxxx), which prints a blank page.
Am I missing something?
The problem may be caused by closing the window before the page is printed, causing the memory of the page to be freed and resulting in a blank print.
Also, why do you use
window.printandself.closewhenwindow == selfin this context?