want to print part of my page.. (window.print()??)

Discussion in 'Javascript' started by Pudlik, Szymon, Aug 24, 2005.

  1. Hi,
    I have page with left banner (links), footer and header and of cours
    with some images and text. I want to print this page but without banner,
    header and footer. Only images and text. Is it possible to do that?
    window.print() is printing all informations on page but I want only some
    part of it. Any ideas?
    Greetings, Szymon Pudlik.
     
    Pudlik, Szymon, Aug 24, 2005
    #1
    1. Advertising

  2. Pudlik, Szymon

    Robert Guest

    Pudlik, Szymon wrote:
    > Hi,
    > I have page with left banner (links), footer and header and of cours
    > with some images and text. I want to print this page but without banner,
    > header and footer. Only images and text. Is it possible to do that?
    > window.print() is printing all informations on page but I want only some
    > part of it. Any ideas?
    > Greetings, Szymon Pudlik.
    >


    You can use media-dependant style sheets for this and for example hide
    certain blocks when printing.

    http://www.w3.org/TR/CSS21/media.html

    This solution is not dependant on javascript.
     
    Robert, Aug 24, 2005
    #2
    1. Advertising

  3. Robert wrote:

    > You can use media-dependant style sheets for this and for example hide
    > certain blocks when printing.


    I put media=print style and it works :) Thanks for your help!
    Greetings, Szymon.
     
    Pudlik, Szymon, Aug 24, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page