Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How print selelcted portion of jsp page

 
kavan desai
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
I want to take a print out of my jsp page but if i use java script's window.print() function it will print whole jsp page but i want to take print of some selectd portion .. can any body sugess how can i do that??

And please tell when should i ask java script related questions.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65104
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the HTML/Javascript forum.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to look into CSS with print media. You can search google and find tutorials on implementing it. Basicallyyou have two style sheets oon the page. The print media only shows up when the page is printed so you can hide the elements you do not want shown.

Eric
 
kavan desai
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Eric,
For reply . But i don't understand "You need to look into CSS with print media" ? can explain me in more detail or can you give some link for that ?

Thanks,
kavan
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by kavan desai:
Thanks Eric,
For reply . But i don't understand "You need to look into CSS with print media" ? can explain me in more detail or can you give some link for that ?

Thanks,
kavan

Here it is
http://www.meyerweb.com/eric/articles/webrev/200001.html
http://www.alistapart.com/stories/goingtoprint/
and http://www.google.com/search?sourceid=navclient&ie=UTF-8&rls=GGLG,GGLG:2005-22,GGLG:en&q=css+print+media
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic