Feedback on: irt.org FAQ Knowledge Base Q1294
Worth:
Not worth reading
Comments:
The syntax top.frames[1].document.print() doesn't work on IE5 or Netscape 4.7. I wish I knew what would work.
Worth:
Worth reading
Length:
Too short
Technical:
Not technical enough
Comments:
This answer helped me achieve what I wanted, though the provided syntax didn't work initially for me. Here's a description of what IS working for me, with both Netscape 4.7 and IE 5:
1) Create a 2-part frameset, for example:
<FRAMESET ROWS="15%, 85%" FRAMESPACING=0" >
<FRAME name="frame1" src="topframe.html">
<FRAME name="content" src="filetoprint.html">
</FRAMESET>
The name of the frame I want to print is "content."
2) the following form is in the html loaded into "frame1".
<form>
<INPUT type="button" value="Print on local printer" onclick="window.parent.content.focus(); window.parent.content.print()"> <INPUT type="button" value="Cancel" onclick="parent.close()"></FORM>
When the "print on local printer" button is pressed, the focus switches to the content frame and that frame prints.