I have a table with dynamically added rows that have different properties for dynamic use, submit, etc. I have one input box with a auto-complete function that has to change the rest of the input boxes values. How can change their values without a fixed name, id or class?
The dynamically created row:
<tr>
<div id="1">
<div id="2">
<input type="text" name="input1" id="input1" class="input1" />
</div>
<div id="3">
<input type="text" name="input2" id="input2" class="input2" onkeyup="foo(this);"/>
</div>
</div>
<input type="text" name="input3" id="input3" class="input3" />
<input type="text" name="input4" id="input4" class="input4" />
</tr>
The JavaScript function:
foo(node){
//node.name is input2
change input1.value;
change input3.value;
change input4.value;
};
I can´t rely on static properties for the function, they have to be passed after the elements are created.
rownumber