Hi,
Below is my code which adding row dynamically on clicking button.I want to insert these data in database.Any idea how to do this kind of work.
function addrows(cid)
//here we point the tbody variable to the table
var tbody = document.getElementById(cid).getElementsByTagName("TBODY")[0];
//here we create a row element
var row = document.createElement("TR");
//here we create the first cell element
var t1 = document.createElement("TD");
//here we popuate the first cell with 'Test1'
t1.innerHTML=document.getElementById("t1").value;
//here we create the second cell element
var t2 = document.createElement("TD");
//here we popuate the first cell with
email@server.com'
t2.innerHTML=document.getElementById("t2").value;
var t3 = document.createElement("TD");
t3.innerHTML=document.getElementById("t3").value;
//here we append the cells to the created row element
row.appendChild(t1)
row.appendChild(t2)
row.appendChild(t3);
document.getElementById("t1").value="";
document.getElementById("t2").value="";
document.getElementById("t3").value="";
//here we append the created row element to the table
tbody.appendChild(row)