Why won't this script make the check box "read-only"?
I have a script for a checkbox that when checked will check other checkboxes at once. It is supposed to check all of the boxes and then make those checkboxes read-only, reverting back again if the original checkbox is then unchecked.
For some reason, the first check box (CheckBoxNA7.1) won't turn to read-only and I can't figure out why! I am only showing a portion of the script as the full script has 6 checkboxes and all the other 5 turns to read-only, just not 7.1 for some reason. Can anybody see what the issue might be?
if(event.target.isBoxChecked(0)){
this.getField("CheckBoxNA7.1").checkThisBox(0,true);
this.getField("CheckBoxNA7.1").readonly = true;}
if(event.target.value != "Off"){
this.getField("Score7.1").value = "";
this.getField("CheckBoxD7.1").value = "Off";
this.getField("CheckBoxD7.1").readonly = true;
this.getField("CheckBoxNA7.2").checkThisBox(0,true);
this.getField("CheckBoxNA7.2").readonly = true;}
if(event.target.value != "Off"){
this.getField("Score7.2").value = "";
this.getField("CheckBoxD7.2").value = "Off";
this.getField("CheckBoxD7.2").readonly = true;
this.getField("CheckBoxO7.2").value = "Off";
this.getField("CheckBoxO7.2").readonly = true;}
else
this.getField("CheckBoxNA7.1").checkThisBox(0,false);
this.getField("CheckBoxNA7.1").readonly = false;
if(event.target.value == "Off"){
this.getField("Score7.1").value = 3;
this.getField("CheckBoxD7.1").readonly = false;
this.getField("CheckBoxNA7.2").checkThisBox(0,false);
this.getField("CheckBoxNA7.2").readonly = false;}
if(event.target.value == "Off"){
this.getField("Score7.2").value = 4;
this.getField("CheckBoxD7.2").readonly = false;
this.getField("CheckBoxO7.2").readonly = false;}
