I have a table which has dynamic rows of input text boxes. Need to save these dynamic textbox values to an object.
textbox names and values are below : first_textbox : names : name1, name2, name3....etc second_texbox : school1, school2,school3.. etc... third_textbox : branch1, branch2,.... etc
var n = 10;
var myObject = {};
for (i=1; i<n; i++) {
var saveName = "name"+i;
var saveSchool = "School"+i;
var saveBranch = "branch"+i;
var saveName = document.getElementById("saveName").value;
var saveSchool = document.getElementById("saveSchool").value;
var saveBranch = document.getElementById("saveBranch").value;
myObject { Name: saveName, School: saveSchool, Branch: saveBranch);
}
so at the end the myObject should have 10Names, 10Schools, 10Branches....
Could anyone give me a suggection?