Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q508 How can I print a page which is not the current page, without showing it?

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>

©2018 Martin Webb