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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How do i generate printable web pages on the fly using javascripts?

    I've been using jsp and javascripts programs for our website in SSS. My boss wants to make the web pages printer-friendly. Php has already done this. (Web2printer). But changing all jsps to php will be tiresome and will just put all the past effort to trash. I need some javascripts that parses html page that is going to be printed and generates a highly optimized page following the layout as defined in a custom stylesheet.

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,075
    Thanks
    0
    Thanked 256 Times in 252 Posts
    Your post seems to be in the wrong thread, but here's the solution.

    You can make a printer-friendly page via CSS and no scripting needed.
    You don't have to create a separate page.
    You can display elements in the page but hide them when printed.

    http://wsabstract.com/dhtmltutors/cssmedia2.shtml
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #3
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Moved to a separate thread in the JS forums.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards


  •  

    Posting Permissions

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