Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
April 12, 2008, 1:21 am
rate this thread
im new to this group but ill be direct to the point.
im tryin to create a simple webpage that will print the contents of
the webpage to a printer on a client side machine.
i know the command is ' window.print() ' and that i can have it in
the ' onload() ' statement so that the print dialouge appears prior to
here my question. how do i eliminate the Header and Footer information
that is automatically generated by the webpage?(i.e. the website name
at the top, and the location url at the bottom)
any help appreciated.
First, create a style like this ...
Next, whenever you are serving something that you don't want to be printed,
place it in a paragraph like this ...
(this is my print button by the way)
<BUTTON TYPE=BUTTON onClick="window.print()"
style="width:250px;height:50px;">  PRINT  </BUTTON>
Now, when you run the page, and you click the button, then everything thats
NOT within a 'dontprintme' paragraph will not be printed.