|
-
July 24th, 2005, 02:07 AM
#1
Get document's/table's real size using JS
Hi all,
I've created a web page that contains only a table, and I need to get the page's size.
I've tried using document.documentElement.scrollHeight or document.body.scrollHeight but I get the browser's window size and not only body's.
I thought about passing over all the table's TR's and sum all heights and widths. Something like:
table = document.getElementById("tblForm");
for (i=0 ; i<table.numRows ; i++)
height += table.rows[i].height.
for (i=0 ; i<table.numCols ; i++)
width += table.cols[i].width.
Does JavaScript has the properties for doing that, or is there any other way to know the table's/body's size?
Help will be truly appreciated
Last edited by druven; July 24th, 2005 at 03:00 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|