This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates 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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Printer friendly option in javascript" Watch "Printer friendly option in javascript" New topic
Author

Printer friendly option in javascript

Kannan BLR
Greenhorn

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
Marshal

Joined: Jan 10, 2002
Posts: 61448
    
  67

"Kannan", please check your private messages.


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

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

OR

You can look into CSS Print Media

Eric
Steph Sam
Greenhorn

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