File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

window.print() not working with IE6.0

 
lubna kausar
Ranch Hand
Posts: 51
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
In my portlet I need to generate an HTML and print it.
the new page I am generating using the following code.
function printMethod(){
MyWindow = window.open('','PrintWindow','toolbar=no,titlebar=no,width=800,height=800,scrollbars=yes');
MyWindow.document.write("<html><body bgcolor=#F1F8FE><table width=100%><tr><td style='font-size: 13px; font-family: Verdana,Arial,sans-serif; color:#003366; font-weight: bold'>"+document.getElementById('headerInfo').innerHTML+"</td><td align=right><a href='javascript:window.print();'>Print</a></td></tr></table>"+document.getElementById('requestSummaryDiv').innerHTML+"<br><br><center><a href='javascript:window.print();'>Print</a><center></body></html>")
}
It works fine with mozaila.
but when it comes to Internet Explorer
it blocks the content and doesnt even show the warning from where i can allow the blocked content...
so it does not even open the printer window in IE.
is there any solution to this?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic