This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Printer friendly option in javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Printer friendly option in javascript" Watch "Printer friendly option in javascript" New topic

Printer friendly option in javascript

Kannan BLR

Joined: Mar 01, 2005
Posts: 10
we craeted a JSP page report. getting values from database & displayed the values as a report in JSP Page. "print" option of this page is not printing entire report using javascript code like window.print().

when i click "print" hyperlink text, entire report will open in new page where i should use print preview for that page.

please give suggestion to me.

Kannan.A<br />
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63547

"Kannan", please check your private messages.

[Asking smart questions] [About Bear] [Books by Bear]
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
Need to use and on the onload of that page you call window.print()


You can look into CSS Print Media

Steph Sam

Joined: Dec 09, 2007
Posts: 15
[Content removed: please do not post the same question in more than one place]
[ January 21, 2008: Message edited by: Bear Bibeault ]
Don't get me started about those stupid light bulbs.
subject: Printer friendly option in javascript
It's not a secret anymore!