0

I'm using the following function to print my my pop up window in Internet Explorer 11:

function openWin() {         
     var myWindow = window.open('', '', 'width=200,height=100');
     myWindow.document.write("<p>This is 'myWindow'</p>");
     myWindow.focus();
     window.print();
}

However, window.print() only works when the Internet Explorer is opened in compatibility mode. So how can I set the window.open to open the new window in compatibility mode?

EDIT: The answer in the suggested duplicate question didn't work for me I got this error:

"You can only have one <title> element within the <head> element."

The suggested answer that shows the meta tag compatibility mode doesn't show how to use it in window.open

user3340627
  • 3,023
  • 6
  • 35
  • 80

0 Answers0