Hi,
I am trying to build a simple dynamic table where users can insert a new row anywhere in the table. Each row has a textfield that are identified using the row number that it is in.
Say I want to insert between row 2 and 3. Row 3 is going to be pushed down to row 4. So, the textfield id "field3" should be changed to "field4", and the new row will have a textfield with id "field3".
Is this possible to change the name of an id? If not, what alternative way can I try where I can keep track of the textfields in table after insertion?
Thanks.
Min
I am trying to build a simple dynamic table where users can insert a new row anywhere in the table. Each row has a textfield that are identified using the row number that it is in.
Code:
<tr><td><input id="field1" type="textfield" /></td></tr>
<tr><td><input id="field2" type="textfield" /></td></tr>
<tr><td><input id="field3" type="textfield" /></td></tr>
Say I want to insert between row 2 and 3. Row 3 is going to be pushed down to row 4. So, the textfield id "field3" should be changed to "field4", and the new row will have a textfield with id "field3".
Is this possible to change the name of an id? If not, what alternative way can I try where I can keep track of the textfields in table after insertion?
Thanks.
Min