>Enabled
>Disabled
…
function my_field_change()
{
var my_value = document.forms[0].my_field.value;
...
if (dhcp_relay == "1") {
document.forms[0].some_other_field.disabled = 1;
}
...
}
In the function “my_field_change()” I’m expecting to have ‘my_value’ equal to either 1 or 0, bit it won’t happen. What am I doing wrong?
You have to get the value associated with the selected index:
If you can’t get that to work, another option is to update the html to use an id, and reference that id specifically in the javascript:
…