I would like to know if it is easy or difficult to do the next thing:
Thanks very much.
06-26-2009, 09:16 AM
Originally Posted by kinunt
But my problem is referencing the other fields because I haven't id attributes and the position of the nodes are different each time.
Those fields must have something unique (id), or something stable (position, DOM relationship) or something in common (same name, same class, same attribute...). It the last case, that something property must be univoque, that means it has to belong to all those elements, but only to them.
Now... giving them the same class looks the most convenient way. If so, tell me and I will give you a crossbrowser function getElementsByClassName() (as you might know, IE does not support the native getElementsByClassName() method)
06-27-2009, 04:14 AM
in HTML tables, rows have .rowIndex, and cells have .cellIndex ...
combined with parentNode, row.cells[n], and table.rows[n], you can refer to any other cell without any special attribs.
something like cell.related=[cell2,cell21,cell33];