OM wrote:
To make the collapse / expand functionality I want to use JavaScript
to display / hide table rows using row.style.display = "inline" /
"none".
Be aware that CSS 2 requires
table-row
and not
inline
for table row elements thus if you want to script table rows in Mozilla
for instance then you shouldn't use inline but use table-row as the
value for the CSS display property.
To get references to the table rows they all need unique id's. I want
the root node to have id="1", the nodes on the second level should
have id="1.1", "1.2", "1.3", the nodes on the third level should have
id="1.1.1", "1.1.2", "1.1.3" etc.
id=1
id=1.1
id=1.1.1
id=1.1.2
id=1.2
id=1.2.1
The html code is made using a repeater (<netui:repeater>). Is it
possible to give the table rows dynamic ids as I loop through the
repeater?
Yes, why not, but there are rules for id attribute values, see here
<http://www.w3.org/TR/html4/struct/global.html#h-7.5.2>
<http://www.w3.org/TR/html4/types.html#type-name>
so you need to start an id attribute value with a letter a-zA-Z.
--
Martin Honnen
http://JavaScript.FAQTs.com/