Hi,
I have a text field which is potected (read only). Now I want it to be NOT protected when A particular option is selected from a drop down select form field which appears before this form field.
<select name="mat_attended" size="1" onChange='enableDisableSubstituteMemberField(this.value)'>
<option value="Y" >Attended</option>
<option value="N" >Not Attended</option><option value="P" >Part</option>
<option value="S" >Substituted</option>
<option value="" selected></option>
</select>
<input type="text" name="mat_substitute_member_id" maxlength="8" value="" AUTOCOMPLETE="OFF" onKeyUp="this.value=this.value.toUpperCase(); protectKey('',this, true);" protected="true" class="input_id_protected" >
And this is my enableDisableSubstituteMemberField function on the select field so far which is not working.
<script language="javascript" type="text/javascript">
<!--
function enableDisableSubstituteMemberField(MAT_ATTENDED) {
//alert(MAT_ATTENDED);
if (MAT_ATTENDED == "S") {
alert("Substitute selected");
// then enable the Substitute Member form field
return setPropertyAttribute(MAT_SUBSTITUTE_MEMBER_ID, protected, NO);
} else {
//alert("something else");
// do nothing
}
}
//-->
</script>
Can anyone please help me? Thanks
I have a text field which is potected (read only). Now I want it to be NOT protected when A particular option is selected from a drop down select form field which appears before this form field.
<select name="mat_attended" size="1" onChange='enableDisableSubstituteMemberField(this.value)'>
<option value="Y" >Attended</option>
<option value="N" >Not Attended</option><option value="P" >Part</option>
<option value="S" >Substituted</option>
<option value="" selected></option>
</select>
<input type="text" name="mat_substitute_member_id" maxlength="8" value="" AUTOCOMPLETE="OFF" onKeyUp="this.value=this.value.toUpperCase(); protectKey('',this, true);" protected="true" class="input_id_protected" >
And this is my enableDisableSubstituteMemberField function on the select field so far which is not working.
<script language="javascript" type="text/javascript">
<!--
function enableDisableSubstituteMemberField(MAT_ATTENDED) {
//alert(MAT_ATTENDED);
if (MAT_ATTENDED == "S") {
alert("Substitute selected");
// then enable the Substitute Member form field
return setPropertyAttribute(MAT_SUBSTITUTE_MEMBER_ID, protected, NO);
} else {
//alert("something else");
// do nothing
}
}
//-->
</script>
Can anyone please help me? Thanks