Hello all,
In Acrobat form javascript,
I created 2 CheckBox(CB1 and CB2),
CB1 to involve 3 RadioBox(RB1a, RB1b and RB1c),
CB2 to involve 3 RadioBox(RB2a, RB2b and RB2c).
(ok)
If you press "ON" CB1, the RadioBox(RB1a, RB1b and RB1c) can be choose.
And the CB2, and RadioBox(RB2a, RB2b and RB2c) is Readonly and "OFF".
Conversely,
(ok)
If you press "ON" CB2, the RadioBox(RB2a, RB2b and RB2c) can be choose.
And the CB1, and RadioBox(RB1a, RB1b and RB1c) is Readonly and "OFF".
(ok)
If you do not press "ON" the CB1 and CB2,
then RadioBox(RB1a, RB1b, RB1c, RB2a, RB2b, RB2c) is Readonly and "OFF".
(ok)
If CB1 press "ON" and choose RB1b,
after that, CB1 "ON" directly change CB2 "ON", RB1b has been eliminated.
In CheckBox1 script
===============================================
if (this.getField("CB2").value=='0') {
this.getField("RB1").readonly = false;
this.getField("RB2").readonly = true;
this.getField("RB2").value = '';
} else {
this.getField("RB1").value = '';
this.getField("RB1").readonly = true;
}
In CheckBox2 script
===============================================
if (this.getField("CB2").value=='1') {
this.getField("RB2").readonly = false;
this.getField("RB1").readonly = true;
this.getField("RB1").value = '';
} else {
this.getField("RB2").value = '';
this.getField("RB2").readonly = true;
}
But why I create "Textbox1" to get Radiobox value, the results display "Off" in textbox1??
In Textbox1 script
===============================================
if (this.getField("CB2").value=='0') {
event.value = this.getField('RB1').value;
} else {
event.value = this.getField('RB2').value;
}
Pls help how to solve this problem, thanks a lot!
George Kaiser