[thelist] Hiding/Showing table rows (as in how to do it)

Burhan Khalid burhankh at hotmail.com
Thu Aug 30 15:57:10 CDT 2001


Hey James :

    I know exactly what you are talking about, because I use the same
technique to form (albeit a crude) collapsing menu system. Here are a few 
steps that you can use to get the basic setup going :

    1. Set your <TD> tag to something like this :
       <td id=menuItemOne style="display:"
       (this will set the row to be "open" ie. displayed by default))
       <td id=menuItemOne style="display:none"
       (this will set the row to be hidden by default)

    2. Then write this little snippet of JavaScript
       function doCollapse() { menuItemOne.style.display = 'none' }
       function doExpand() { menuItemOne.style.display = ' ' }

That's it! If you need more help, or a live example, send me an email

Burhan Khalid
burhankh at hotmail.com



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp





More information about the thelist mailing list