How do I iterate nameless elements
Posted on 2006-03-24
I'm programming an application that displays a list of selected database tulips with some restriction in information due to simplicity in the list. However I got a request to enable an option to "expand" every row, displaying the "short description" of the tulip. Easy enough. Now, when a user select a table row it displays the complete information in another frame and sets the row to selected. This works fine with one row, but with the expanding row I've encountered problems. With my current scipt I only select the first row.
Here's an example:
<tr onmouseover="className='highlight_row';" class="e_r" onmouseout="m_ou(this,'e_r');"onclick="cli(this,'e_r',99,'all');">
<td width="15" style="padding-left: 2px;"> </td>
<td nowrap>Company name</td>
<td nowrap>Contract description</td>
<td align="right"><img title="Copy to clipboard" onclick="cli_copy(99);" height="12" src="../images/copy.gif" width="12"> </td>
<td colspan='3'>Expanded description using 3 columns.</td>
Without the expanded row the last TR is not executed.
So, how do I set both rows to selected (and deselect them when a new one is set)?