• Post Reply Bookmark Topic Watch Topic
  • New Topic

window.print() not working with IE6.0  RSS feed

 
lubna kausar
Ranch Hand
Posts: 51
  • 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?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!