wood burning stoves
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 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 />kannanmsc@sify.com
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63348

"Kannan", please check your private messages.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
Need to use window.open 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 ]
I agree. Here's the link: http://aspose.com/file-tools
subject: Printer friendly option in javascript
It's not a secret anymore!