wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Give me solution for my problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Give me solution for my problem" Watch "Give me solution for my problem" New topic

Give me solution for my problem

Diya charu

Joined: Nov 29, 2006
Posts: 8
Hi friends,

Can you help me out. i am very new to javascript,
In my page i have many paragraphs and scrollable table. i want to print only table.
Is it possible to print only table without printing entire page?
currently i am using window.print() in javascript,but its print entire page.
Sivaraman Lakshmanan
Ranch Hand

Joined: Aug 02, 2003
Posts: 231
Hi Diya,
One thing you can do is parse the whole HTML document and take only the content between <table> and </table> tags. This should give the whole table. Then print the same.

Hope this helps

Diya charu

Joined: Nov 29, 2006
Posts: 8
Hi Shiva,

I am new to this javascript. can you explain in detail how to parse html document.Thanks for your previous reply.

with regards
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60782

Please read this.

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

Joined: Nov 08, 2001
Posts: 15376
CSS Print Media

I agree. Here's the link: http://aspose.com/file-tools
subject: Give me solution for my problem
Similar Threads
Help me for this problem
display tag..Printing all rows of a table
Issue in Iframe
Print Jsf datatable issue
print the entire swing screen