You are here: irt.org | FAQ | JavaScript | Print | Q508 [ previous next ]
Load it into a hidden frame, and then in Netscape Navigator 4 or Internet Explorer 5 beta 2+ use window.print(). For example:
<frameset rows="100%,*"> <frame src="controlpage.html"> <frame src="pagetoprint.html"> </frameset>
In controlpage.html:
<script language="JavaScript"><!--
if (window.print)
document.write('<form><input type="button" value="Print" onClick="parent.frames[1].focus();parent.frames[1].print()"><\/form>');
//--></script>