window.print() not working in IE

Posted by Pankaj on Stack Overflow See other posts from Stack Overflow or by Pankaj
Published on 2010-03-31T18:59:43Z Indexed on 2010/03/31 19:03 UTC
Read the original article Hit count: 337

Filed under:
|

I am doing something like this in javascript to print a section of my page on click of a link

function printDiv() {
 var divToPrint = document.getElementById('printArea');
 newWin= window.open();
 newWin.document.write(divToPrint.innerHTML);
 newWin.print();
 newWin.close();
}

It works great in Firefox but not in IE.

Could someone please help

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about print