I am having an issue with a set of 3 radio buttons. I have three radio buttons named rbCompanion, with export values of; A, U, and N/A
I also have a text field named txtCompanion. I am trying to write javascript so that if the N/A radio button is chosen the Text field will be grayed out and state N/A. If anything else is selected the text field will stay editable and trasparent. I can get the text box to gray out and state N/A. HOWEVER, if I select another radiobutton say the one that exports A, the text box remains grayed out and states N/A. Below is my script, I have this on all three radio buttons on mouse up. Any suggestions on what I could do will be greatly appreciated
var a = this.getField("rbCompanion")
var b = this.getField("txtCompanion")
if(a.value == "N/A")
{
b.fillColor = color.ltGray;
b.value = "N/A";
b.readonly = true;
}
else if(a.value == "A")
{
b.fillColor = transparent;
b.value = "";
b.readonly = false;
}
else if(a.value == "U")
{
b.fillColor = transparent;
b.value = "";
b.readonly = false;
}
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com