How to print article?

Discussions

Web tier: servlets, JSP, Web frameworks: How to print article?

  1. How to print article? (8 messages)

    Hello

    I am using html,JSP to develop web pages(articles). In one of the article(html), there are banners, adv., links,etc. If I click on print this article link then only article should be seen, other matters like banners, adv., etc should be removed. Manually removing each adv. takes time for many articles(html), so how to remove other content dynamically.

    Print this article link is shown in various news related websites. How they do it?

    Looking forward for an early reply.

    Thanks

    Threaded Messages (8)

  2. How to print article?[ Go to top ]

    HelloI am using html,JSP to develop web pages(articles). In one of the article(html), there are banners, adv., links,etc. If I click on print this article link then only article should be seen, other matters like banners, adv., etc should be removed. Manually removing each adv. takes time for many articles(html), so how to remove other content dynamically.Print this article link is shown in various news related websites. How they do it?Looking forward for an early reply.Thanks
    "Print this article" link is outdated. Use CSS, define different CSS for different media: "screen" and "print". CSS for "print" media would not contain all the banners, menus, sidebars, etc. Search net for CSS and for media type. For example, see http://javascriptkit.com/dhtmltutors/cssmedia.shtml
  3. How to print article?[ Go to top ]

    Thanks but most of my articles are stored in database so I have to do JDBC & retrive data.
  4. How to print article?[ Go to top ]

    Thanks but most of my articles are stored in database so I have to do JDBC & retrive data.
    If you already have retrieved it to show in browser, what is the point to load it again?
  5. How to print article?[ Go to top ]

    ya, but what to do, all the articles are in database.
  6. How to print article?[ Go to top ]

    U know, in previous Jsp, where banners, adv., menus, articles,etc. are coming from database then clicking on print this article link should open new window with only article to be display with print button (various news related websites has this) so again same article is coming from database. Hundreds of articles are in database so what to do? I have to load it again.

    What U feel since all articles are stored in database?
  7. How to print article?[ Go to top ]

    U know, in previous Jsp, where banners, adv., menus, articles,etc. are coming from database then clicking on print this article link should open new window with only article to be display with print button (various news related websites has this) so again same article is coming from database. Hundreds of articles are in database so what to do? I have to load it again.What U feel since all articles are stored in database?
    You already have loaded all this stuff from database and shown in to the user. Now when the user wants to print it, he would print data from the browser cache, right? So you just need to remove references to banners. This can be done easily with CSS.
  8. How to print article?[ Go to top ]

    ok, so I don't have to write JDBC again to retrieve same article & there is no more trip to database to fetch that same article since everything is done thru client side browser cache.
    By the way, do I have to write some code for browser cache since every user(cleint side browser) will have different settings?
  9. How to print article?[ Go to top ]

    Hi Michael Jouravlev

    I implemented, it worked.

    Thanks