So I have a small issue: I created a drop down menu and a text field beside it. Only one selection in the drop down menu should cause the text field to unghost. All other selections should cause the text field to lock, so to speak.
The code below:
</td> <td><select name="employee_type" onchange="document.getElementById('otherField').disabled=(this.value == 1, 2)">
<option value=0>Temporary</option>
<option value=1>Regular</option>
<option value=2>Special Access User</option>
<input id="otherField" type="text" name="date_expires_input" value="YYYY/MM/DD" style="color:#aaa; font-style:italic;" onclick="this.value=''; this.style.color='#000'; this.style.fontStyle='normal';" />
</tr>
does do that. However, if the user was to select “Temporary” and then change his mind to select “Regular”, the field would remain ghosted. Anyone know why?
how about
? it’s the other way round, so to say… you cannot say
this.value == 1, 2, you would then have to saythis.value == 1 || this.value == 2