printing issue

In my application, I've displayed a Receipt(In a table) along with other Information. I want to give a button "Print" so that only the content of that table will be printed. How do I do that?
[206 byte] By [harinibiligiria] at [2007-11-27 5:45:18]
# 1
Let the button call the Javascript function window.print() and use CSS to disable layout elements which shouldn't be printed using display: none;.Also see http://www.w3.org/TR/REC-CSS2/media.html how to determine media types and make use of it.
BalusCa at 2007-7-12 15:26:55 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Is there any related link (example) on this topic. Pl ...
harinibiligiria at 2007-7-12 15:26:55 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
I already have given you a link?Or if you already have read it, but don't understand it somehow, then please ask specific questions regarding to your problem.
BalusCa at 2007-7-12 15:26:55 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...