View Full Version : How to create a Print Button that prints a certain selection of the page

01-12-2010, 07:55 PM
The title says it all but to clarify:

Software: Adobe Dreamweaver CS4
Skills: Not much

I'm working on a .php page that has a form that was converted from Word to HTML. I wanted to add a "Print this page" button to the bottom of the document for easy printability. I want the Print Button to ONLY print the document, not the heading or footer.

Here's what I only want to print when the button is pressed

<img src="images/black_xxxxxxx.gif" width="73" height="74" alt="xxxxxxx" />
<p align="center"><font size="4"><strong>DISPUTE RESOLUTION SERVICES</strong></font></p>
<p align="center"><font size="3">MEDIATOR RESPONSIBILITIES</font></p>
<p align="center">Please read the following responsibilities and fill out the information at the bottom of the form.</p>
<li>Attend the First Timer's 2-Day Mediation Training. You must be present for the full duration of training.</li>
<li>You must be willing to mediate <strong>at least one </strong>case each semester (fall, spring, and summer).</li>
<li> <em>*While we have no way of predicting how much demand there will be for
mediating disputes, we need to know that you are willing to invest this
minimal amount of time and commitment.</em> </li>
<li>You must attend <strong>at least one</strong> Refresher or Brown Bag ongoing training session each semester (fall, spring, and summer).</li>
<p>___<strong>YES</strong>, I am eager to be a part of xxx's Mediation Team and am willing to accept the <br>
responsibilities outlined.</p>
<p>___<strong>NO, </strong>I am not interested in becoming involved at this time.</p>
<p>Signature_______________________________________________ Date: ___________</p>
<p>Print Name_____________________________________________</p>
<p align="center">Thank you for your interest!</p>
<p align="center">If you have any questions, please feel free to contact us at (xxx) xxx-xxxx or email us at <a href="mailto:xxxxxxxx@xxxx.xxx.xxx">xxxxxxxx@xxxx.xxx.xxx</a></p>

01-13-2010, 05:28 AM
<style media=print>


.PageNext{page-break-after: always;}


<input class="Noprint" type="button" onclick="window.print()" value="print" /></div>

use css to hidden the cotent u didnt what to print like print button

brightyour site:http://www.brightyoursite.com

01-13-2010, 05:43 AM
better to create a stylesheet for print purposes and to make all the parts you don't want printed, set them to display:none.

<link rel='stylesheet' href='whatever' media='print' />

inside the file the sections not for printing would be like

#name_of_element_with_an_id {

You might want to validate your code too - validator.w3.org :hint: