I am currently using the innerHTML property of a DIV to add rows to a table dynamically. However, as a lot of rows are added, the script starts to get very slow. This is because each row in the table contains 14 input fields. Each time a row is added the complete table is regenerated. This means that every time a row is added, the contents od every input field must be retrieved for output in the new table (with the additional empty row).
I have seen an 'adjacentHTML' property somewhere and what I would like to know is can I use this to add a row to the table without having to regenerate the table rows that are currentlty there. Bear in mind that this table is enclosed in a form and all the newly generated rows must be able to be submitted.
Can I do something like:
<FORM>
<TABLE>
<DIV ID="myDIV">
<TR><TD>........</TD></TR>
.
.
</DIV>
</TABLE>
submit buttons here...
</FORM>
<a href='' onClick="myDiv.adjacentHTML='<TR><TD>....</TD></TR>'">Add Row</A>
Is it possible to do something like this????? Mise Le Meas,
Mighty
I have seen an 'adjacentHTML' property somewhere and what I would like to know is can I use this to add a row to the table without having to regenerate the table rows that are currentlty there. Bear in mind that this table is enclosed in a form and all the newly generated rows must be able to be submitted.
Can I do something like:
<FORM>
<TABLE>
<DIV ID="myDIV">
<TR><TD>........</TD></TR>
.
.
</DIV>
</TABLE>
submit buttons here...
</FORM>
<a href='' onClick="myDiv.adjacentHTML='<TR><TD>....</TD></TR>'">Add Row</A>
Is it possible to do something like this????? Mise Le Meas,
Mighty