Hi,
I want to another 2nd drop down menu when first one is selected.
Basically I have the following, and want to change the value of second drop down when USA is selected in the first:
<FORM NAME="form1">
<SELECT NAME="select1" onLoad="myOnChange();" SIZE="1" >
<OPTION VALUE="none"></OPTION>
<OPTION VALUE="UK">UK</OPTION>
<OPTION VALUE="USA">USA</OPTION>
<OPTION VALUE="GERMANY">Germany</OPTION>
</SELECT>
<SELECT NAME="select2" SIZE="1" >
<OPTION VALUE="none"></OPTION>
<OPTION VALUE="EN">English</OPTION>
<OPTION VALUE="UEN">American English</OPTION>
<OPTION VALUE="GERMAN">German</OPTION>
</SELECT>
So when USA is selected I want the second one to say American English straight away. If UK is selected then English is selected etc...
I have tried using the following but have not had much success:
<script>
function myOnChange() {
if (document.form1.select1.selectedIndex.value='USA'){
this.form1.select2.value = 'UEN'
}
}
</script>
Can anyone help??
</LABEL>
</FORM>
I want to another 2nd drop down menu when first one is selected.
Basically I have the following, and want to change the value of second drop down when USA is selected in the first:
<FORM NAME="form1">
<SELECT NAME="select1" onLoad="myOnChange();" SIZE="1" >
<OPTION VALUE="none"></OPTION>
<OPTION VALUE="UK">UK</OPTION>
<OPTION VALUE="USA">USA</OPTION>
<OPTION VALUE="GERMANY">Germany</OPTION>
</SELECT>
<SELECT NAME="select2" SIZE="1" >
<OPTION VALUE="none"></OPTION>
<OPTION VALUE="EN">English</OPTION>
<OPTION VALUE="UEN">American English</OPTION>
<OPTION VALUE="GERMAN">German</OPTION>
</SELECT>
So when USA is selected I want the second one to say American English straight away. If UK is selected then English is selected etc...
I have tried using the following but have not had much success:
<script>
function myOnChange() {
if (document.form1.select1.selectedIndex.value='USA'){
this.form1.select2.value = 'UEN'
}
}
</script>
Can anyone help??
</LABEL>
</FORM>