Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Posts
    264
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I need a script that...

    Prints another page when you click Print

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Montreal, Canada
    Posts
    644
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <link rel=alternate media=print href="printversion.doc">

    IE only I believe.

  • #3
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    A thread that popped up not long ago.

    http://www.codingforums.com/showthre...4&goto=newpost

    That might help.

  • #4
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    Originally posted by x_goose_x
    <link rel=alternate media=print href="printversion.doc">

    IE only I believe.
    I should have read the DD page properly. I thought it was cross browser.

    Tell me this please though. In NS4,5 and 6, what happens if you have used thois script? Does the print button do nothing or does it just still print the page as viewed in the browser? (i have yet to install NS6 after a big crash).

    thanx

  • #5
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It will print the page defined in the href part.

    Not a button. The page will try to print automatically. Did you look at the other thread? we were discussing it there.

  • #6
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    Yup, I read it missing-score.

    I havent seen an answer to my needs though. I am wanting to pront out - not just a button - but a web page with or without its graphics. The problem is that the normal print function only prints out the viewable part of the page. I have used external .css files with the overflow of the text set to scroll. The normal print function misses out all the text that is not visible in the window, so I was looking for a script which got around this. The IE only one does it in one way and as we know, it doesnt work in NS. I just wondered how the print function works in NS if the 'printversion.doc' script is used.

    Does it
    a, not print at all
    b, print the same as if printversion.doc script wasn't used
    c, do something else?

    thanx

  • #7
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Does it? I thought it printed the entire page. Oh well.

    I will try and dig up some more info to help you. Ill post back soon.

  • #8
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Another idea.

    Do you need it to print automatically?

    If you dont, you could make another stylesheet something like:

    Code:
    image { 
    display: none;
    }
    and so on for all the tags you dont want, and then have javascript write a new styleset. I think this would work, but I am getting a bit rusty on javascript cos I do alot of PHP

  • #9
    Regular Coder
    Join Date
    Apr 2003
    Location
    Atlanta, GA
    Posts
    487
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Another idea.

    Originally posted by missing-score
    If you dont, you could make another stylesheet something like:

    Code:
    image { 
    display: none;
    }
    and so on for all the tags you dont want, and then have javascript write a new styleset.
    Actually, what would be MUCH easier is creating a stylesheet for the print media only:
    Code:
    <link rel="stylesheet" href="print.css" media="print" />

  • #10
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ooops. Missed that one. Yeah, that would work.

    Nice one!


  •  

    Posting Permissions

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