I've got one form where it was more convenient to name the values of an arrayed field with the same Name and ID. Unfortunately, I also need to be able to access them individually as well. I can't seem to find the DOM technique for accessing beyond the first field. Here's the snippet that demonstrates the problem:
<html>
<head><title>Test</title></head>
<body>
<form id='TestForm' name='TestForm'>
<input type='text' id='TextBox' name='TextBox' value='TextBox #1' /><br />
<input type='text' id='TextBox' name='TextBox' value='TextBox #2' /><br />
</form>
<script language='JavaScript'>
document.write("TextBox #1 = " + document.getElementById("TextBox").value + "<br>");
document.write("TextBox #2 = " + document.getElementById("TextBox").value + "<br>");
</script>
</body>
</html>