how can i modifie the options of select
Hi,
I am stuck with a problem ….
A user is face with two selections institute and chain ,
<SELECT ID=”INSTITUTE” onChange=”check()”>
<OPTION SELECTED=”TRUE” VALUE=””>– Please Select Institute –</OPTION>
<OPTION VALUE=”ISIMS”>ISIMS</OPTION>
<OPTION VALUE=”ISGI”>ISGI</OPTION>
</SELECT>
<SELECT ID=”CHAIN” >
<OPTION SELECTED=”TRUE” VALUE=””>– Please Select Chain–</OPTION>
<OPTION VALUE=”MICE”>MICE</OPTION>
<OPTION VALUE=”MIM”>MIM</OPTION>
</SELECT>
So before the user can submit the selection i have a check, because if the user has selected “ISIMS”, then the selection CHAIN should have as options MIM and MICE ,else if the user has selected “ISGI”, then the selection CHAIN should have as options IGI and ERE.it means that it depend on the institute.
I wish there was a simple function like get but set (setElementById) something on the lines of: setElementById(institute).option[0].value = “MIM”
But as far as I am aware there is none…is there a way on setting the option value of the select menu!