Meaningless Drivel is fun!*
The moose likes HTML, CSS and JavaScript and the fly likes window.print() not working with IE6.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "window.print() not working with IE6.0" Watch "window.print() not working with IE6.0" New topic
Author

window.print() not working with IE6.0

lubna kausar
Ranch Hand

Joined: May 06, 2006
Posts: 51
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?
 
 
subject: window.print() not working with IE6.0