Is it possible to make dynamic ids for html-tags

Giganews Newsgroups
Subject: Is it possible to make dynamic ids for html-tags
Posted by:  OM (..@-.-)
Date: Fri, 18 Mar 2005

I am trying to present tree-structure information using a html table
and JavaScript. Each tree node is displayed in the first column in a
table row.  The tree node can also have additional information in
other table columns.

To make the collapse / expand functionality I want to use JavaScript
to display / hide table rows using row.style.display = "inline" /
"none".

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?

-------
OM

Replies