Reputation: 14088
Hello I getting not visible IFrame in IE I try print it, but IE return error what focus() method not identified. Why I get it? I remember that some days ago it wored
var iFrame = document.frames["printIfram"]; //document.frames.printIframe;
iFrame.focus();
iFrame.print();
Upvotes: 0
Views: 545
Reputation: 113
i got the same problem in ie8 and i thought it's a bug of ie
i tryed the accepted answer ,it haven't work yet;
nomatter where is the window.print()
,it always print the parent page
so ,i give up the iframe,just open a new tab to print
have you got it work?
Upvotes: 0
Reputation: 114367
Put a print function inside the Iframe to make it print itself on load:
At the bottom of the page, just use window.print()
Upvotes: 1
Reputation: 324630
You missed the e
on the end of printIframe
.
If that's just a typo, try iFrame.contentWindow.focus()
.
Upvotes: 0