This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Height of a Table Using Javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Height of a Table Using Javascript" Watch "Height of a Table Using Javascript" New topic
Author

Height of a Table Using Javascript

Pankaj Patel
Ranch Hand

Joined: Jul 13, 2006
Posts: 73
Hi.

I am Pankaj Patel and i need your help.

How to find out height of a perticular html table using java script.

I had tried and seen is like, if i define height attribute in table tag, then it's coming but if i am not defining then it's not coming.

However, imagine, even though i am not giving/defining height attribute in table, after the page get loaded, it will be having some height. Can we find it out?

Regards,
Pankaj Patel
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2713
    
    5

Moving to Javascript forum..


SCJP, SCWCD.
|Asking Good Questions|
J. Kevin Robbins
Ranch Hand

Joined: Dec 16, 2010
Posts: 633
    
    7

$('#someDiv').height()

Check out this post for some more tips.


"There is no reason for any individual to have a computer in his home" ~ Ken Olson, Co-founder of DEC, 1977
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60072
    
  65

Jk Robbins wrote:$('#someDiv').height()


This, of course, assumes the use of jQuery.

Without jQuery (as the link discusses) it's rather difficult.involved.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Height of a Table Using Javascript
 
Similar Threads
Clarification on Sefl test - K&B book
How to get Table height in run time ?
Style issue
Control Printing
Border Spacing and CSS problem