I have two select dropdowns in one form. If one selectedIndex == a certain number I set the other selectedIndex appropriately. I have the following js working fine:
<script language="javascript">
function fnCheckCategory(form)
{
var passed = true;
if (form.websiteid != null)
if (form.ReqTypeFilter.selectedIndex != 7) {form.websiteid.selectedIndex = 0;};
passed = true;
}
</script>
I now need to add a condition if form.ReqTypeFilter.selectedIndex == 7, then set the form.websiteid.selectedIndex = 1. I thought it would be easy enough to add an else if statement, but everything I've tried thus far does not work.
<script language="javascript">
function fnCheckCategory(form)
{
var passed = true;
if (form.websiteid != null)
if (form.ReqTypeFilter.selectedIndex != 7) {form.websiteid.selectedIndex = 0;};
passed = true;
}
</script>
I now need to add a condition if form.ReqTypeFilter.selectedIndex == 7, then set the form.websiteid.selectedIndex = 1. I thought it would be easy enough to add an else if statement, but everything I've tried thus far does not work.