Quackit Logo
FREE Hosting!
With every domain you register with ZappyHost you get FREE hosting.
Create free Flash websites

JavaScript Print Version - prints current page.

Print Version

You can create a page that automatically makes the Windows print dialogue box appear with a full version of the HTML page you want to print.

To create a "Print this page":

  1. Copy and paste the following code in between the <HEAD> and </HEAD> tags of the document that you want printed:



  2. Add the following to your <BODY> tag: onload="printpage()"

So, your body tag should look something like this:

<body bgcolor="#FFFFFF" onload="printpage()">

Why create a print version?
You may find that you have an article that spans many HTML pages. You may have done this because "it's not user friendly to make users scroll". The reality of it is, it's not user friendly to make people click on multiple links, simply to finish the story! Many users would rather print "the whole thing", then read it later.This is easily achieved using JavaScript to create a one-page "print version".

The "create print version" automatically automatically opens the print dialogue box. If you, as a programmer, coincide this with a "Print this tutorial" type message, users will only need to click on the "Print this tutorial" link and the Windows' print dialogue box will automatically appear, along with the Printer friendly version.

Enjoy this website?

  1. Add this page to your Favorites
  2. Link to this page (copy/paste into your own website or blog):
  3. Help support Quackit by making a donation

Oh, and thank you for supporting Quackit!

Need Website Content?
Get unique, quality digital content for your website.
  • 270+ Website Templates
  • 800+ Flash Templates
  • 25,000+ Images, Logos
  • 30,000+ e-Books
  • 15,000+ Scripts
  • 27,000+ Animated GIFs
  • 21,000+ Ringtones
  • ...and much more!
Get your content now!
$1.99 .info domain names!
© Copyright 2000 - 2010 Quackit.com