get containing table width

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marc Lambrichs

    get containing table width

    I want to dynamically (cross-browser) read the width of the table a td
    element belongs to. Any ideas?

    Cheers,
    --
    Marc Lambrichs



  • DU

    #2
    Re: get containing table width

    Marc Lambrichs wrote:[color=blue]
    > I want to dynamically (cross-browser) read the width of the table a td
    > element belongs to. Any ideas?
    >
    > Cheers,[/color]


    Assuming
    <td id="idTableCell " ...>
    then

    var WidthOfTable =
    document.getEle mentById("idTab leCell").offset Parent.offsetWi dth;

    should work in MSIE 6 for Windows in standards compliant rendering mode,
    Mozilla-based browsers (17 browsers) and Opera 7.x

    DU
    --
    Javascript and Browser bugs:

    - Resources, help and tips for Netscape 7.x users and Composer
    - Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x


    Comment

    Working...