View Full Version : using InnerHtml to dynamically add the rows

01-25-2006, 08:27 AM
Hi All,
i am having a tale in HTML page which is having set of rows.
<table id="tabid"><tr><input ...><img src="add-row.gif"> </tr>
<tr><input ...></tr>
<tr><input ...></tr>
<tr><input ...></tr>
<!-- need to ad a row here-->

i need to code a javascript to add a row similar to the one present above when u clik on add-row.gif image but for the 1st row del-row.jpg shud be there to delete the row.

see the attached file for code

though this code will give u an idea(but is not complete...similar code is written for the other rows also...)
I am able to add the rows successfully but facing the probs while deleting..
facing probs while deleting the 2nd row...3rd row gets deleted..

pls helpme

Thanks & Regards
Mahesh P

01-25-2006, 09:31 AM
using innerHTML is NOT the way to do this if you are interested in a DOM solution say