D
Daniel
Hello,
I'm trying to enable/disable a textbox by reference but seem to be
having a great deal of trouble.
function enableField(EleName,EleVal)
{
// All controls in form 'usrsel'
// EleName = Name of the control to be disabled
// EleVal = Comparison string, value from the select control
alert("The control id is: " + EleName + " " + EleVal)
If (EleVal == 'Other')
{
document.usrsel.getElementsByName(EleName).disabled=false;
}
else
{
document.usrsel.getElementsByName(EleName).disabled=false;
}
}
The issue is I place the alert statement for troubleshooting. it work
and returns the value I send from the onchange event. However, The If
stament does not seem to trigger. Could someone help me get this
functional.
Thank you
Daniel
I'm trying to enable/disable a textbox by reference but seem to be
having a great deal of trouble.
function enableField(EleName,EleVal)
{
// All controls in form 'usrsel'
// EleName = Name of the control to be disabled
// EleVal = Comparison string, value from the select control
alert("The control id is: " + EleName + " " + EleVal)
If (EleVal == 'Other')
{
document.usrsel.getElementsByName(EleName).disabled=false;
}
else
{
document.usrsel.getElementsByName(EleName).disabled=false;
}
}
The issue is I place the alert statement for troubleshooting. it work
and returns the value I send from the onchange event. However, The If
stament does not seem to trigger. Could someone help me get this
functional.
Thank you
Daniel