Hi,
I have an asp page that contain rows of record. Some rows already contain data that I retreive from database. The rest of the row are blank. When user input all those empty rows and still need more rows, then he would click Add button.
I found sample for a input type text cell. But some of my cell contain image. Can someone provide sample for insert image cell?
sample for text cell
My row
By the way, is there easier way to add the rows? I have total of almost 40 cells. It's going to be a lot of coding.
Something that similiar to clonenode but I want the input cells of the new rows to have its own name and id.
Thanks in advance
I have an asp page that contain rows of record. Some rows already contain data that I retreive from database. The rest of the row are blank. When user input all those empty rows and still need more rows, then he would click Add button.
I found sample for a input type text cell. But some of my cell contain image. Can someone provide sample for insert image cell?
sample for text cell
Code:
var cellRight = row.insertCell(1);
var el = document.createElement('input');
el.type = 'text';
el.name = 'txtRow' + iteration;
el.id = 'txtRow' + iteration;
el.size = 40;
My row
Code:
<tr>
<!--each group contain vertical line(image),space(image), input box, space(image) -->
<td bgcolor="#999999"><img src="images/1px_999999.gif" width="1" height="25" border="0"></td>
<td><img src="images/spacer.gif" width="8" height="1" border="0"></td>
<td width class="ver10pxblk"><input type="Text" name="XITEM<%=i%>" size="10" id="c1_<%=i%>" maxlength="10" value="<%=hts(i)%>" ></td>
<td><img src="images/spacer.gif" width="8" height="1" border="0"></td>
<td bgcolor="#999999"><img src="images/1px_999999.gif" width="1" height="25" border="0"></td>
<td><img src="images/spacer.gif" width="8" height="1" border="0"></td>
<td class="ver10pxblk"><input type="Text" name="XNAME<%=i%>" size="15" id="c2_<%=i%>" maxlength="25" value="<%=cntryorigin(i)%>" ></td>
<td><img src="images/spacer.gif" width="8" height="1" border="0"></td>
By the way, is there easier way to add the rows? I have total of almost 40 cells. It's going to be a lot of coding.
Something that similiar to clonenode but I want the input cells of the new rows to have its own name and id.
Thanks in advance