Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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

irt.org | Knowledge Base | JavaScript | Print | Q560 [ previous next ]

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

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">
</form>

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?


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.