Following is some code I found and slightly modified.
The ID of the hidden iFrame is "hiddenFrame".
There is a formatted page of data in "codeList".
I want to click a link and run the script that will print "codeList".
What would follow this to print the iFrame?
ifrm.document.print(); does not work.

CODE
var ifrm = document.getElementById('hiddenFrame');
    ifrm = (ifrm.contentWindow) ? ifrm.contentWindow : (ifrm.contentDocument.document) ? ifrm.contentDocument.document : ifrm.contentDocument;
    ifrm.document.open();
    ifrm.document.write(codeList);
    ifrm.document.close();


I found the problem. I needed "name=" in addition to "ID=" in the iFrame.