This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printing the contents of a JSP....

 
sailaja parepalli
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to provide print functionality in my JSP. There should be a print button and when the user clicks this 'print' link/button it should pop-up a new window with the contents from the parent window.
I can pop-up the new window, but the problem here is I could not pass a java bean object to this window in order to display my contents on the new window.
I cannot print the contents of parent window directly, because the data is being displayed in the area with scrollbars (created using <div> tags).
Does anybody have a solution or sample code for this?
Thanks much.
--
Sailu
[ February 09, 2004: Message edited by: Bear Bibeault ]
 
Anil Kumar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is achievable through Javascript itself somethink like window.print()
Scroll bar should not be a concern as long as the content can fit on a normal size paper...I don't the use of opening a new window
 
Mani Ram
Ranch Hand
Posts: 1140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by AnilKumar:
This is achievable through Javascript itself somethink like window.print()
Scroll bar should not be a concern

Scroll bars will create problem, if they are formed using DIV tags. Try it.
Sailu,
I don't understand what is the problem with accessing a Java bean object from the new window! Are you getting some errors?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic