Control header/footer printing

Discussion in 'Javascript' started by Andrew Poulos, Mar 6, 2008.

  1. I can setup a print CSS file to control how my page prints but is there
    a way to hide the header and the footer?

    Currently the page's title and URL display in the header and page number
    and date in the footer and I'd rather they didn't print.

    Andrew Poulos
     
    Andrew Poulos, Mar 6, 2008
    #1
    1. Advertising

  2. Andrew Poulos

    Evertjan. Guest

    Andrew Poulos wrote on 06 mrt 2008 in comp.lang.javascript:

    > I can setup a print CSS file to control how my page prints but is there
    > a way to hide the header and the footer?
    >
    > Currently the page's title and URL display in the header and page number
    > and date in the footer and I'd rather they didn't print.
    >


    That is browser dependend,
    and not under the influence of the page's javascript.

    That it is not under the influence of the page's CSS is OT.

    [If you want to have a complete say over the print layout, use pdf.]

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Mar 6, 2008
    #2
    1. Advertising

  3. Andrew Poulos wrote:
    > I can setup a print CSS file to control how my page prints but is there
    > a way to hide the header and the footer?


    Maybe. Try comp.infosystems.www.authoring.stylesheets instead.


    PointedEars
    --
    Use any version of Microsoft Frontpage to create your site.
    (This won't prevent people from viewing your source, but no one
    will want to steal it.)
    -- from <http://www.vortex-webdesign.com/help/hidesource.htm>
     
    Thomas 'PointedEars' Lahn, Mar 7, 2008
    #3
  4. Andrew Poulos <> writes:

    > I can setup a print CSS file to control how my page prints but is
    > there a way to hide the header and the footer?
    >
    > Currently the page's title and URL display in the header and page
    > number and date in the footer and I'd rather they didn't print.


    If you're using CSS media specification you can just set display: none
    (or display: hidden) on everything you don't want to print.

    Should work on most modern browsers, at least it worked in IE and
    Mozilla last time I checked (5 years ago).

    --
    Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
     
    Joost Diepenmaat, Mar 7, 2008
    #4
  5. Andrew Poulos

    Jeff North Guest

    On Thu, 06 Mar 2008 22:53:51 +1100, in comp.lang.javascript Andrew
    Poulos <>
    <47cfdb4e$0$23635$> wrote:

    >| I can setup a print CSS file to control how my page prints but is there
    >| a way to hide the header and the footer?
    >|
    >| Currently the page's title and URL display in the header and page number
    >| and date in the footer and I'd rather they didn't print.
    >|
    >| Andrew Poulos


    As others have stated, this is not a javascript of css problem.
    You can however use an ActiveX control to set margins etc

    http://www.meadroid.com/scriptx/freedep.asp

    Note that is will not work in browsers that do not support ActiveX.
    The user will be prompted to install this on their machine (you may
    want to have some information about this on your web page).
    It changes the settings of the printer and can affect other
    applications.
    -- -------------------------------------------------------------
    : Remove your pants to reply
    -- -------------------------------------------------------------
     
    Jeff North, Mar 9, 2008
    #5
    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.
Similar Threads
  1. will
    Replies:
    3
    Views:
    829
    Mathieu CARTOIXA
    Aug 6, 2003
  2. Replies:
    1
    Views:
    507
    Leif K-Brooks
    Oct 25, 2006
  3. Peter
    Replies:
    9
    Views:
    7,942
    Peter
    Jun 16, 2009
  4. Henrik
    Replies:
    1
    Views:
    429
    Ken Cox [Microsoft MVP]
    Jul 6, 2006
  5. fjanon
    Replies:
    5
    Views:
    370
Loading...

Share This Page