asked on
function addRow(divname)
{
var totalrows = document.getElementById('invoice').rows.length-1;
var product = '<?php echo $products; ?>';
var newdiv = document.createElement('<tr>');
newdiv.innerHTML = "<td><strong>" + (totalrows + 1) + "</strong></td><td><div class='field'><select name='product[]' id='product'><option selected='selected'></option>" + product + "</select></td>";
document.getElementById(divname).appendChild(newdiv);
}