<!DOCTYPE html>
<html>
<body>
<p>Click the button to open an about:blank page in a new browser window that is 200px wide and 100px tall.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
var myWindow = window.open("https://www.google.com", "", "width=200,height=100");
myWindow.print();
}
</script>
</body>
</html>
In this codebase myWindow.print()
does not open a print dialog box in Internet Explorer 11. I want the window print dialog to open.
If I use window.print()
, it prints a blank page and not the page I want. I want myWindow.print()
to open a print dialog box.
Please help!