I want to operate radio buttons in Javascript.
I have a question about radio buttons.
I've been searching the sea of the net for two days just following problem, but no hint has fallen anywhere.Please help me !!
=====
Based on a certain calculation, I would lile to make a javascript that automatically checks radio button.
The "true side radio button" if the result is true, and "false side radio button" if the result is false.
I don't get caught in debugging, and it doesn't appear alarm.
But it doesn't work.
========
First, I created a script that looks like this:
But it does not react at all.
var Ave1 = this.getField("Ave_1").value;
var Ave2 = this.getField("Ave_2").value;
var RadioAve = this.getField("Radio_Ave").value;
if (Ave1>=Ave2){
RadioAve[0].checked = true;}
else{RadioAve[1].checked = true;}
========
Next, I tried with the following script.
I created a separate button and placed the script there.
This also does not react.
var RadioAve = this.getField("Radio_Ave").value;
RadioAve[0].checked = true;
========
Lastly I tried it with a checkbox.
I created a separate button and placed the script there.
But this also doesn't respond.
var CheckAve = this.getField("Check_Ave").value;
CheckAve[0].checked = true;
========
Is this impossible with Acrobat DC?
Or is there a serious mistake in my code?
