Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Prints text only.

  1. #1
    Join Date
    Jul 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow Prints text only.

    Is this possible:

    What i want it to do is have a button called 'Print Screen'. Now when you click this button ALL it prints is the text. So when you click the button or text it just comes up with the print set upbox and ALL it prints is ONLY the text. Can anyone help?

    Now i need this for a Forum, IF. Does anyone have the code?

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    This isn't Javascript, it's CSS.
    The "Print Screen" button isn't possible, but using print stylesheets, you can print only text when the user decides to print or view a print preview.
    Code:
    <style type="text/css">
    @media print {
      img {
        display: none;
      }
      * {
        background-image: none;
        border-style: none;
        background-color: white;
        color: black;
      }
    }
    </style>
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jul 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well thats it but where would i add it to an Invision Free Forum board ?

    And do i need to edit any of it ?

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    The head, and no.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Jul 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I just inserted it and put it in the <head> section of the forum and when i clicked print and then preferences it said 'Text + Images'. Does this matter or will it just print the text anyway ?

  6. #6
    Join Date
    Jul 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Right print preview it doesnt show the images apart from like 'Moderation Operations' lol but is there now a code which makes it print landscape ??

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    No.

  8. #8
    Join Date
    Jul 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    O Well i guess its not helpful .. Cause on the Forum it cuts off bits of the text.

  9. #9
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You'll just have to ask the user to set the page orientation to landscape when printing.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. #10
    Join Date
    Jul 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Last question .. lol. Can i make it so at the bottom of the Topic theres text saying 'Print Page'. When you click it, it comes up with the print options and it includes the code above, the print only text code.

Bookmarks

Posting Permissions

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