I need a general javascript function which disables / enables fields on specified select options.
<select name="form">
<option value="1">everything enabled</option>
<option value="2">disable form-input 1 and 2</option>
<option value="3">disable form-input 3, 4 and 5</option>
</select>
So input forms 1 and 2 should be disabled when option 2 is selected and so on. The function must be written general so that the option-value as well as the fields to be disabled must be given to the function via variable / array.
Any idea?
Thanks, Henning