I am working on a project with asp.net
and vb.net
language system.
Now I made a table on the asp file, and before clicking on a button "update", by JavaScript, I would like to get all the string data written in the text boxes each placed inside a cell of the table.
Now, I wrote the following codes;
function getData(){
var tblData = new Array();
var table = document.getElementById("<%=tblA.ClientID%>");
var i;
var txt;
var txt2;
tr = table.getElementsByTagName('tr');
for (i = 0; i < tr.length; i++) {
var ttl = "txt : ";
var ttl2 = "txt2 : ";
td = tr[i].getElementsByTagName('td');
txt = td[4].childNodes[0].nodeValue; //This is wrong...
txt2 = td[10].childNodes[0].nodeValue; //This is wrong...
alert(ttl + txt + ttl2 + txt2);
tblData[i, 1] = txt;
tblData[i, 2] = txt2;
}
}
// Here, I would like to send the array object containing the data of the textboxes. How can I do it?
return true;
}
Now, please let me know what to wrote to get the texts from the textboxes, and how to send the array data to the server for update_click
function to get it.