I have an asp form with various drop-downs
if the user chooses no it locks the drop-down, if they choose yes it enables the drop-down choices, example as below.
If the user chooses Yes, how do I force the user to choose from the drop-down?
regards
gwilym
function disableIt(Field)
{
//Set the disabled property to true and clear the field contents
Field.disabled = true;
Field.value = "";
}
function enableIt(Field)
{
Field.disabled = false;
}
function extracheck(Field)
{
return !Field.disabled;
}
<TR><TD><font face="Arial">Yes:</TD><TD><INPUT TYPE="radio" NAME="Section7_NewAccess" VALUE="Yes" CHECKED onClick="enableIt(document.HouseApp3.Section7_NewAccessType);"></TD><TD><SELECT NAME="Section7_NewAccessType" onClick="return extracheck(this)"><OPTION><OPTION>Vehicular<OPTION>Pedestrian</SELECT></TD></TR>
<TR><TD><font face="Arial">No:</TD><TD><INPUT TYPE="radio" NAME="Section7_NewAccess" VALUE="No" onClick="disableIt(document.HouseApp3.Section7_NewAccessType);"></TD></TR>
if the user chooses no it locks the drop-down, if they choose yes it enables the drop-down choices, example as below.
If the user chooses Yes, how do I force the user to choose from the drop-down?
regards
gwilym
function disableIt(Field)
{
//Set the disabled property to true and clear the field contents
Field.disabled = true;
Field.value = "";
}
function enableIt(Field)
{
Field.disabled = false;
}
function extracheck(Field)
{
return !Field.disabled;
}
<TR><TD><font face="Arial">Yes:</TD><TD><INPUT TYPE="radio" NAME="Section7_NewAccess" VALUE="Yes" CHECKED onClick="enableIt(document.HouseApp3.Section7_NewAccessType);"></TD><TD><SELECT NAME="Section7_NewAccessType" onClick="return extracheck(this)"><OPTION><OPTION>Vehicular<OPTION>Pedestrian</SELECT></TD></TR>
<TR><TD><font face="Arial">No:</TD><TD><INPUT TYPE="radio" NAME="Section7_NewAccess" VALUE="No" onClick="disableIt(document.HouseApp3.Section7_NewAccessType);"></TD></TR>