Whenever I use javascript to create a document with document.write
I include an iframe element
then I try to print the contents using iframe.print()
but nothing happens - no error message and no print dialog box.
How can I successfully initiate a print action?
MyFrame.document.write('<html><body>' + HTMLText + '</body></html>');
document.getElementById("IFramePrint").style.display = "inline";
MyFrame.focus();
MyFrame.print();