Can anyone pls help figure out where i am going wrong with the following code:

[function printPDF(){
popWin = window.open('subsoffer.pdf','popUp','top=0,left=0,height=700,width=1000, resizable=yes, scrollbars=0, menubar=0');
popWin.focus();
setTimeout("popWin.print();",5000);
}]

This function printPDF() is invoked when through the onclick event applyed to <td>.
So far a PDF is opened as a popup and a print dialog window is also opened soon after the PDF window. This is what i want but it only works in firefox and not in IE 7.In IE 7 the PDF popup is opened but the print dialog is not opened, instead i get a Permission denied error in IE 7. What could be causing this? You help so much appreciated

Check the browser security settings first.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.