1. I've started a massive SPAM purge, any accounts that have spammed are being removed, also for a short period new user signups are disallowed until the SPAM cleaning is finished.

Print screen button

Discussion in 'General Programming' started by midlandi, May 22, 2007.

Thread Status:
Not open for further replies.
  1. midlandi

    midlandi Can you smell that?

    Joined:
    Jan 22, 2007
    Messages:
    4,722
    Likes Received:
    44
    Trophy Points:
    48
    Location:
    Uk
    This button will allow your user to print the screen that they are on.

    HTML:
    <html>

    <head>
    <title>Print screen button</title>
    <script language="JavaScript">
    <!-- hiding
    function varitext(text){
    text=document
    print(text)
    }
    //  End -->
    </script>
    </head>

    <body>
    <div align="center">
    <form>
    <input name="print" type="button" value="Print this Document!"
    onclick="varitext()">
    </form>
    </div>
    </body>
    </html>
     
    1 person likes this.
    Loading...
  2. Sa9i

    Sa9i New Member

    Joined:
    May 27, 2007
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    0
    thanks for the code
  3. dhscott

    dhscott New Member

    Joined:
    May 21, 2007
    Messages:
    94
    Likes Received:
    2
    Trophy Points:
    0
    Print as in Print-out using a Printer or Print Screen as in captures the contents of the screen in an image?

    If its Print-out, surely this would do?

    Code (Text):
    function printout() {
    window.print();
    }

    <a href="#" onclick="printout()">#</a>
    Just the way I do it anyway, I'm sure there's more advanced ways of doing it also :)
  4. soori

    soori New Member

    Joined:
    May 27, 2007
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    0
    Normally a webmaster should be knowing this piece of code
  5. 1092387456

    1092387456 New Member

    Joined:
    May 28, 2007
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    0
    thanks!, very cool code! im going to install it now.
  6. midlandi

    midlandi Can you smell that?

    Joined:
    Jan 22, 2007
    Messages:
    4,722
    Likes Received:
    44
    Trophy Points:
    48
    Location:
    Uk
    I understand what you say, but we dont all know everything. Thats why i want this forum to be different to all the other similar forums.
    I want members to be able to ask the simplest of questions without ridicule, after all we all have "brain freeze" from time to time,and as i say we cat all know everything.
    It would great to see sharing of ideas and help between all of us.Experienced and newbies alike.
    Alot of resource areas seem to be designed soley for the experienced, so lets stand aside from that and create a forum resource site for all.
    We all have different areas of expertise and knowledge,thats a powerfull thing we can create here.
    :):
  7. soori

    soori New Member

    Joined:
    May 27, 2007
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    0
    Good piece of reply..
    I agree
Thread Status:
Not open for further replies.

Share This Page