tags:

views:

37

answers:

1

When I create a document using javascript document.write

this is an iframe

then i call iframe.print()

nothing happens no error and no print dialog.

how can I print?

MyFrame.document.write('<html><body>'+HTMLText + '</body></html>');
document.getElementById("IFramePrint").style.display = "inline";
MyFrame.focus();
MyFrame.print();
+3  A: 

You need to focus() on the iframe first.

Babiker
I am calling focus first...
zachary