<% @level1.each do |row1| %>
<table id="tbl_main1" name="tbl_main1">
<tr>
**<td><a href="javascript:toggle_visibility('tbl1','lnk1');">**
**<div align="right" id="lnk1" name="lnk1" width="2%">[+]</div></a></td>**
</tr>
<tr>
**<table id="tbl1" name="tbl1">**
<tr><td height="0.5" bgcolor="#EEEEEE"></td></tr>
</table>
</tr>
</table>
<% end %>
I want am creating multiple tables on runtime using a loop in Ruby. But I want to change the id’s of ‘link1’ and ‘tbl1’ dynamically such that each table has a unique ‘tbl’ name and ‘lnk1’ name.
will do what you want I think.