D
Dom Nicholas
Hi,
I have a table (inside a form) that is dynamically created ie the user
can add / remove rows dynamically. Each table row has 4 columns :
a selection pull down list
a text field for entering an amount
a check box
a button
Note that the cell's and rows does not have a meaningful NAME tags ( the
value is simply an incremented value each time a row is created ).
When the user submits the form, I want to verify the supplied values. I
want to loop over the each row and inspect the rows' cells contents.
So for each row, I want to:
- find out what was selected in the pulldown list
- look at the amount given in the text field
- see if the check box is
How do I do this ? I can get to a cell, thetable.rows[0].cells[1] for
example, but then I'm lost. I don't want to use innerHTML if possible.
There must be a way to access the cell's content, access its assigned
object and then get its value. I've seen firstChild.nodeType been used
in places but (a) can't make sense of it cos I'm a novice at the DOM,
and (b)have not been able to find what the nodeType's are , for example,
what is type 3 and where can I find a reference of possible values/types
?
ok thanks very much for any help on this.
-Dom
I have a table (inside a form) that is dynamically created ie the user
can add / remove rows dynamically. Each table row has 4 columns :
a selection pull down list
a text field for entering an amount
a check box
a button
Note that the cell's and rows does not have a meaningful NAME tags ( the
value is simply an incremented value each time a row is created ).
When the user submits the form, I want to verify the supplied values. I
want to loop over the each row and inspect the rows' cells contents.
So for each row, I want to:
- find out what was selected in the pulldown list
- look at the amount given in the text field
- see if the check box is
How do I do this ? I can get to a cell, thetable.rows[0].cells[1] for
example, but then I'm lost. I don't want to use innerHTML if possible.
There must be a way to access the cell's content, access its assigned
object and then get its value. I've seen firstChild.nodeType been used
in places but (a) can't make sense of it cos I'm a novice at the DOM,
and (b)have not been able to find what the nodeType's are , for example,
what is type 3 and where can I find a reference of possible values/types
?
ok thanks very much for any help on this.
-Dom