Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Posts
    143
    Thanks
    0
    Thanked 0 Times in 0 Posts

    is there any way to get table height when

    Hello
    say i have table defined in the page but i didn't set the height of the table and
    its growing dynamically (based on output from the server ) now im trying
    after the page is done loading ( onload=int()) to get the table height with no luck
    is there any way to get the table height ? even if i did not set any ( that is written height="300px") ?

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <body onload="alert( document.getElementById( 'myTable' ).offsetHeight );">

    <table id="myTable">
    <tr>
    <td>One</td>
    <td>Two</td>
    <td>three</td>
    </tr>
    <tr>
    <td>One</td>
    <td>Two</td>
    <td>three</td>
    </tr>
    <tr>
    <td>One</td>
    <td>Two</td>
    <td>three</td>
    </tr>
    </table>
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •