////the problem is that when I select the Officer RadioButton, only the RT021 checkbox is marked with "X", when I select the Reenlistment RadioButton, everything annotated is selected as it should, when I select the Enlisted RadioButton, nothing happens, all checkboxes are still empty
all 3 RadioButtons are grouped and I have enetered the script at the group level and not individaul
I believe that I missed something to actually link the script, not sure
here is the script:
---- from1.NJWPage2.RadioButtonList::change: - (JavaScript, client) ----------------------
if (Officer.rawValue == 1)
{
ISC1.rawValue = "1";
TAT1.rawValue = "1";
DD28071.rawValue = "1";
QCRE1.rawValue = "1";
RT021.rawValue = "1";
SOU1.rawValue = "1";
{
else
}
ISC1.rawValue = "0";
TAT1.rawValue = "0";
DD28071.rawValue = "0";
QCRE1.rawValue = "0";
RT021.rawValue = "0";
SOU1.rawValue = "0";
{
if (Enlisted.rawValue == 1)
{
ISC1.rawValue = "1";
TAT1.rawValue = "1";
DD28071.rawValue = "1";
QCRE1.rawValue = "1";
SOU1.rawValue = "1";
}
else
{
ISC1.rawValue = "0";
TAT1.rawValue = "0";
DD28071.rawValue = "0";
QCRE1.rawValue = "0";
SOU1.rawValue = "0";
}
if (Reenlistment.rawValue == 1)
{
ISC1.rawValue = "1";
TAT1.rawValue = "1";
DD28071.rawValue = "1";
DD28081.rawValue = "1";
DD2141.rawValue = "1";
QCRE1.rawValue = "1";
RT071.rawValue = "1";
ENLM1.rawValue = "1";
SOU1.rawValue = "1";
PRIVACYACT1.rawValue = "1";
RELM1.rawValue = "1";
DD41.rawValue = "1";
COMPWRKS1.rawValue = "1";
}
else
{
ISC1.rawValue = "0";
TAT1.rawValue = "0";
DD28071.rawValue = "0";
DD28081.rawValue = "0";
DD2141.rawValue = "0";
QCRE1.rawValue = "0";
RT071.rawValue = "0";
ENLM1.rawValue = "0";
SOU1.rawValue = "0";
PRIVACYACT1.rawValue = "0";
RELM1.rawValue = "0";
DD41.rawValue = "0";
COMPWRKS1.rawValue = "0";
}
Your help is greatly appreciated
Thank You
Next, I notice that there are three distinct "if" statements that set the same values. These "if" blocks are walking on top of each other. You should have One if block that incorporates all conditions.
Next, the concept behind radio buttons is that they act together as a single control. So in concept, individual radio buttons do not have a value, the group has a value. I don't think you've setup the button values properly. You aught to be using the group name, not the button names in the "if" statements", and the value for each button needs to be different, i.e., "1", "2", "3".
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script