Hi, I am trying to reference the values of individual options of a select box, from a javascript function. So far I have this:
where skillID[] occurs in:
It knows the length of the array but individual values are undefined. Do i need to do something special with id's on each of the <option>'s?
Thanks.
Code:
skill_array=document.getElementById('skillID[]').value; for (var i=0; i<skill_array.length; i++){ alert(skill_array[i]); }
Code:
<select name='skillID[]' id='skillID[]' size='5' multiple>
Thanks.
Comment