getting control value from table cell with javascript
-
hi i have genrate a table dynamically with javascript and each row contains a input textbox control with ID and i want to loop through and access the value of each textbox at button click. for (i; i < Table.rows.length; i++) { var oRow = Table.rows(i); ???????????? need control value here is there any way to get control here like oRow.Cells[0]....... } thanks for your help..
Nav.
-
hi i have genrate a table dynamically with javascript and each row contains a input textbox control with ID and i want to loop through and access the value of each textbox at button click. for (i; i < Table.rows.length; i++) { var oRow = Table.rows(i); ???????????? need control value here is there any way to get control here like oRow.Cells[0]....... } thanks for your help..
Nav.
-
could you post the code u used to generate the table here, so i can better understand how you application works.
Brad Australian By contacting your lawyer you negate the right to sue me.
can you please let me know how i can get the value of a control which is in TD section of a table i can access the table with javascript and all its row but dont know how i can get control from cell. sorry cant post the code hope you not mind. thanks
Nav.
-
can you please let me know how i can get the value of a control which is in TD section of a table i can access the table with javascript and all its row but dont know how i can get control from cell. sorry cant post the code hope you not mind. thanks
Nav.
-
hi i have genrate a table dynamically with javascript and each row contains a input textbox control with ID and i want to loop through and access the value of each textbox at button click. for (i; i < Table.rows.length; i++) { var oRow = Table.rows(i); ???????????? need control value here is there any way to get control here like oRow.Cells[0]....... } thanks for your help..
Nav.
From memory (from an old bit of code...)
var numOfRows = Table.childNodes.length
var myRow = Table.childNodes[0];//first row
var numOfCells = myRow.childNodes.length;
var myCell = myRow.childNodes[0]; //gives you first cell
var numOfControlsInCell = myCell.childNodes.length;
var myControl = myCell.childNodes[0]; //gives you the first control in the cell
Regards Angel *********************************************