1
<!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!

kamentk
  • 513
  • 3
  • 12
  • Possible duplicate of [window.print() not working in IE](https://stackoverflow.com/questions/2555697/window-print-not-working-in-ie) – kamentk Oct 18 '18 at 11:24

0 Answers0