I have two html select objects named with the same name (they are arrays with different indexes).
What I am trying to do, is if "off" is selected from the category[0] select element, I would like to disable the category[1] element. I have been trying to use document.getElementsByName() but am having no luck figuring out how to specifically target the category[1] array. See below for example code.
<select name='category[0]'>
<option value='0'>off</option>
<option value='1'>on</option>
</select>
<select name='category[1]'></select>
My question is how can I modify the properties of an HTML object that is an array? I understand I could do this easily using ID's but I would like to learn how to do this using an array.
Thanks