I want to print only the content of multiple iframes in a webpage at once when print button is clicked.
I already tried this code.
function printall() {
window.print();
for (var i=0; i<window.frames.length; i++) {
window.frames[i].focus();
window.frames[i].print();
}
}
After adding this code , If i click on print it prints one by one i.e it prints first iframe and again click on print it prints second iframe.
But I want to print all the iframes at once when clicked on print button.