I have a simple HTML code to print the page. Below is the code: <!DOCTYPE html> <html> <head> <script> function printPage() { var w = window.open("http://www.sigmaaldrich.com/catalog/CofADocRequest.do?symbol=209104&LotNo=MKBP0842V&brandTest=SIGMA","_self"); window.focus(); window.print(); } </script> </head> <body > <input type="button" onclick="printPage()" value="print a div!" /> </body> </html> What the code does is, it displays a button, on clicking that button it calls a function. The function uses open() to open a new URL in the same page by using the "_self " parameter. As we can see in the code, the print() is being called after the call to open method. But in my browser IE11, the print pop is being shown befor loading the page. Due to this I am not printing the correct page. Can anybody help me on this.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)