Reputation: 4976
Is there any attribute which can Identify a particular cell location in HTML table? Also, Can I store that attribute(cell address) in a variable and later use it to update the value of that cell?
For e.g.
Lets say I have a 4 X 4 Table. and I want to update Row 1 Column 3, Row 2 Column 4 and Row 3 Column 2, How do I save a the locations(addresses) of these cells which I can later use to update the cells?
Is this possible?
Upvotes: 1
Views: 112
Reputation: 13575
Very possible.
I mocked up a little something: http://jsfiddle.net/NBmb4/1/
You could save each cell you needed into variables and use those to later reference/modify that cell.
var theCellImLookingFor = cellAtCoord(3, 2);
// modify the cell as needed.
Upvotes: 1
Reputation: 19
Sure there is a way to do that but not "automatically". You always can write a javascript function, probably with two nested cicles, and, after getting a reference a cell (''), assign an 'id' value to each one.
Upvotes: 0