#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    27
    Rep Power
    0

    Question PHP Echo - Print Button


    hi

    I have the following which brings up the print window for my page, however, I would only like to print the "echo" form data which is being displayed and not the entire page.

    any suggestions would be greatly appreciated :-)

    Thank you

    Code:
    <script>
    function printpage()
    {
    window.print();
    }
    </script>
    Code:
    <input type="button" value="Print this page" onclick="printpage()" />
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Sep 2006
    Posts
    1,810
    Rep Power
    529
    any suggestions would be greatly appreciated :-)
    Ask the folks in the JavaScript forum
  4. #3
  5. Banned
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,938
    Rep Power
    0
    Originally Posted by NotionCommotion
    Ask the folks in the JavaScript forum
    And now we have the same thread in another wrong forum.

    This is a CSS question. What you want is a stylesheet for printing.

    Comments on this post

    • Matt1776 agrees : lol ...
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    27
    Rep Power
    0
    lol.......sorry about that. I'm not going to post it again in another forum.. I will first try and see if I can create a print stylesheet (now that i know that is what must be done)

    Thanks guys

IMN logo majestic logo threadwatch logo seochat tools logo