Is there a way to navigate between dynamically generated textfields using an iterator from struts-tags?
<s:iterator value="aList">
<td width="50px" align="center">
<s:textfield name="solField" size="2" maxlength="1" style="text-transform: uppercase; text-align:center"/>
</td>
</s:iterator>
I attempted to use javascript for navigation, but encountered issues due to the fields having the same name. The resulting code in the browser (with three items in the list) is:
<td width="50px" align="center">
<input type="text" name="solField" size="2" maxlength="1" value="" id="correct_solField" style="text-transform: uppercase; text-align:center"/>
</td>
<td width="50px" align="center">
<input type="text" name="solField" size="2" maxlength="1" value="" id="correct_solField" style="text-transform: uppercase; text-align:center"/>
</td>
<td width="50px" align="center">
<input type="text" name="solField" size="2" maxlength="1" value="" id="correct_solField" style="text-transform: uppercase; text-align:center"/>
</td>
If you have any suggestions or solutions, I would greatly appreciate it. Thank you.