I have this particular snippet..
newcell.innerHTML = table.rows[0].cells[i].innerHTML;
//alert(newcell.childNodes);
switch(newcell.childNodes[0].type) {
case "text":
newcell.childNodes[0].value = "";
break;
case "checkbox":
newcell.childNodes[0].checked = false;
break;
case "select-one":
newcell.childNodes[0].selectedIndex = 0;
break;
case "number":
newcell.childNodes[0].value = '';
break;
}
the switch above makes the newly added rows to reset the value from the copied row.
the text and number resets.
but the drop-down and checkboxes do not
what commands does these two need to reset their values? for the dropdown, the first option and for the checkboxes is no box is checked