Invoking Javascript In Iframe From Parent Page, Ie Issue
This is a follow up to this question: Invoking javascript in iframe from parent page I've implemented the answer provided by @Tomalak. Here is a jsFiddle The problem is this, the c
Solution 1:
In IE you need to set focus to the window you want to print. This prints iframe when function is in parent page:
functionprintContent(){
var el = document.getElementById('myFrame');
el.contentWindow.focus();
el.contentWindow.print();
return;
}
If function is in the iframe, you can print it from anywhere:
functionprintContent(){
window.focus();
window.print();
return;
}
Post a Comment for "Invoking Javascript In Iframe From Parent Page, Ie Issue"