www.webdeveloper.com
Results 1 to 4 of 4

Thread: html print friendly pages

  1. #1
    Join Date
    Dec 2002
    Posts
    11

    html print friendly pages

    I am seeking help on how to make one.

    Can it be done with html?

    If so, I don't understand how you save the file. Is it a .html file also? I read in one place where you strip the code off the page you want people to be able to print, but I don't then understand how it's retrieved or saved . . .

    Thanks!

  2. #2
    Join Date
    Nov 2002
    Posts
    984
    <head>
    <style type="text/css" media="screen">
    your view on monitor layout and colors
    </style>
    <style type="text/css" media="print">
    your print to paper layout and colors
    </style>
    </head>
    // Stefan Huszics

  3. #3
    Join Date
    Dec 2002
    Posts
    6
    You can hide all elements on the form which you don't want do be visible in the print version :
    document.name_of_form.elem_form.style.visibility= "hidden";
    After that you can use window.print();

  4. #4
    Join Date
    Nov 2002
    Posts
    984
    Originally posted by andrada
    You can hide all elements on the form which you don't want do be visible in the print version :
    document.name_of_form.elem_form.style.visibility= "hidden";
    After that you can use window.print();
    That solution requires CSS, a DOM and JavaScript turned on in the browser.
    Thus it will always be a worse solution then using CSS alone like I showed becuse it's much more likely to fail.
    // Stefan Huszics

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles