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

Q1478 Is there a way using JavaScript to have a button on a page with frames print a specific frame?

You are here: irt.org | FAQ | JavaScript | Print | Q1478 [ previous next ]

In Internet Explorer 4, no - the print must be an activeX embedded in the page you need ot print and even then if you try to print from another frame, that other frame gets the focus and Internet Explorer 4 will try to print that instead.

In Netscape Navigator 4+ and Internet Explorer 5 you can simply do this:

<FORM>
<INPUT TYPE="button" onClick="if (window.print) { top.otherframe.focus(); top.otherframe.print()}">
</FORM>

Feedback on 'Q1478 Is there a way using JavaScript to have a button on a page with frames print a specific frame?'

©2018 Martin Webb