Hi,
<select name="my_field" onChange="my_field_change();">
<option value="1" <% nvram_match("my_field", "1", "selected"); %>>Enabled</option>
<option value="0" <% nvram_match("my_field", "0", "selected"); %>>Disabled</option>
</select>
...
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?