I have a table of about 18 columns. Contents of each cell have a unique name. The name is typically "rxfy" where x = row number and y = column number. Thus all cells in row no 4 will have r4fy where y will range from 1 thru 18. Ordinarily each cell is a field in a form and has an attribute of "disabled".
In each row in the extreme left of the table is a "modify" button. On clicking the modify button in a row - say row no 4, I would like to change the attribute of all fields in row no 4 to disabled="false".
Progress so far:
What I am looking for:
a For while loop where I move from 1 thru 18 and use this (or something similar) syntax ---- "document.getElementById("XXXXX").disabled=false;" where XXXXX will take values of r4f1 thru r4f18.
Can anyone help me or point me in the right direction?
Thank you in advance.
for( var i = 1; i < 15; i++ )
document.getElementById( "r4f" + i ).disabled = false;
Thank you very much - that worked very nicely.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)