kopite
08-21-2003, 07:30 AM
Hi,
I have four elements all with the same id, I wish to loop through the collection of values that each element has, is that possible on the js side?
e.g.
<input type=text id="myId" value=9>
<input type=text id="myId" value=12>
<input type=text id="myId" value=36>
<input type=text id="myId" value=42>
document.getElementId("myId").value only returns me the first value, i.e. "9". What is the code to get all the collection of values?
Cheers!
I have four elements all with the same id, I wish to loop through the collection of values that each element has, is that possible on the js side?
e.g.
<input type=text id="myId" value=9>
<input type=text id="myId" value=12>
<input type=text id="myId" value=36>
<input type=text id="myId" value=42>
document.getElementId("myId").value only returns me the first value, i.e. "9". What is the code to get all the collection of values?
Cheers!