File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Printing part of JSP page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Printing part of JSP page" Watch "Printing part of JSP page" New topic

Printing part of JSP page

Rishi Kant

Joined: Apr 18, 2000
Posts: 18
My JSP page has two parts.The top part has buttons for different forms.The bottom part has the forms.Initially I thought of using frames but thats against company standards.When I click on a button say Form# 1, then the whole page refreshes and form# 1 shows up in the bottom part and buttons on top.When I click on Print button, the form gets printed WITHOUT THE BUTTONS...Can this be done in a JSP page without frames?
Please help
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17282

I saw a neat trick in a magazine article a short while back where the "visible" attribute of the buttons was turned off for printing - a trick that requires enabled JavaScript and CSS.
For the more general approach, you could do like some of the magazine websites and put a "Click Here for Printer-friendly version" on the page.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Printing part of JSP page
It's not a secret anymore!