Hey all,
Here's the deal... I have an iframe which I am using a to print a certain page without displaying said page. I've use this technique in other areas of my site and they work like a charm. Using the same code as all the other pages:
From page with print icon:
From page (loaded in iframe) to be printed:
The iframe will not print when the icon is pressed though the function is being run (confirmed with an 'alert()'). HOWEVER, if I press my browser's 'Back' button then return to the page using 'Forward', the print dialog displays. It will also print if I load the iframe page in my browser normally.
Any thoughts?
Here's the deal... I have an iframe which I am using a to print a certain page without displaying said page. I've use this technique in other areas of my site and they work like a charm. Using the same code as all the other pages:
From page with print icon:
Code:
function printStudents(url1){
objFrame = document.getElementById('printFrame');
objFrame.src = url1;
objFrame.focus();
}
Code:
function doPrint(){
this.focus();
this.print();
}
document.onload=doPrint();
Any thoughts?
Comment