title: window.print() not working in IE
body: <p>I am doing something like this in javascript to print a section of my page on click of a link</p>
  
  <pre><code>function printDiv() {
   var divToPrint = document.getElementById('printArea');
   var newWin = window.open();
   newWin.document.write(divToPrint.innerHTML);
   newWin.print();
   newWin.close();
  }
  </code></pre>
  
  <p>It works great in Firefox but not in IE.</p>
  
  <p>Could someone please help</p>