Hi I have sevral selects on my page with the name viewer[].
In javascript I wish to iterate through this array and get each ones selected index.
var welements = document.getElementsByName('viewer[]')[0];
for ( var i in welements )
{
alert(i.selectedIndex);
}
I have above but its clearly wrong. I beleive the first line is correct - document.getElementsByName returns an array so I just want the first (and only) result which is the viewer[] html array
Advice appreciated, thanks!