Why isn’t this easier? I’m still a beginner with javascript and I must be missing something really obvious. I’m trying to get a script to work that if the third option is selected in one drop down, it automatically disables another drop down.
What am I missing? My error messages suggest that the vars a and b aren’t translating into the function. It can’t understand process.a.value.
(FYI, the form is named ‘process’). Thanks for any help!
[CODE]function openOption(a,b) {
var val = process.a.value;
if (val == 3) {
document.process.b.disabled = ‘true’;
} else {
document.process.b.disabled = ‘false’;
}
}
Then the html is:
[code=html]<select name=”option1type” onChange=”openOption(‘option1type’,’option1size’);”>
<option value=”0″>Not Used</option>
<option value=”1″>Single Line Text</option>
<option value=”2″>Lg Text Box</option>
<option value=”3″>Checkbox</option>
</select>
<select name=”option1size” >
<option value=”8″>Small</option>
<option value=”18″>Medium</option>
<option value=”30″>Large</option>
</select>