Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Oct 2009
    Thanked 0 Times in 0 Posts

    How to create a Print Button that prints a certain selection of the page

    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>
    Last edited by Legit_Pig; 01-12-2010 at 08:20 PM.

  • #2
    New Coder
    Join Date
    Jan 2010
    Thanked 1 Time in 1 Post
    <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

  • #3
    Master Coder
    Join Date
    Apr 2003
    in my house
    Thanked 201 Times in 197 Posts
    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:


    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link


    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts