I'm trying to print an iframe that I have on a page on my site, but the print window is not opening when I use the following code:
function printFunction() {
window.frames["printf"].focus();
window.frames["printf"].print();
}
<iframe id="printf" name="printf"></iframe>
And when I just use windows.print (); .... it opens the print window, but prints the entire page, not just the iframe content!
function printFunction() {
window.print();
}
<iframe id="printf" name="printf"></iframe >
NOTE: The print button will call function printFunction () by onclick;
Does anyone know what it can be?