#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,928
    Rep Power
    533
    any suggestions would be greatly appreciated :-)
    Ask the folks in the JavaScript forum
  4. #3
  5. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,957
    Rep Power
    1046
    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 ...
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  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