Hello forums !!
I had used the following javascript code for adding rows
function addRow(row)
{
table = row.parentNode.parentNode;
pos = row.rowIndex;
// Row for file
k = 0;
row = table.insertRow(pos);
cell = row.insertCell(k++);
//cell.setAttribute('align','right');
cell.innerHTML = 'File Upload';
cell = row.insertCell(k++);
cell.innerHTML = '<input type="text" name="title[]" class="text" />';
}
for event handling
<input class="text" type="button" name="add" value="add more »" onclick="addRow(this.parentNode.parentNode)" />
I want to make some change with the function.
I want to add a function that deletes the row created by js
how to perform such ?
Please help me. Any help and suggestions will be highly appreciated.
Thank you