Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap

Q560 How do I print the current web page whilst submitting a form?

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

Try the following which works in Netscape Navigator 4+ and Internet Explorer 5 beta 2+:

<form action="nextpage.htm" onSubmit="if (window.print) print()">
<input type="submit">

To adapt this to print on Internet Explorer take a look at the FAQ Can I print the current page using JavaScript on both Netscape Navigator and Internet Explorer?

©2018 Martin Webb