Yes, this is possible with javascript.
In my case I prefer to run the code directly from the radio buttons
as a mouse-up action.
To do this you must use a pair of radio buttons and set them as mutually exclusive (same field name for both radio buttons but different export value on each.
For example, I will name both radio button fields as "myRadio". And then assign to my first radio button an export value of "Choic1". Then in my second radio button I will assign "Choice2" as the export value.
In the radio button with export value of "Choice1" you can use a line os script like this:
this.getField("myTextField").display = display.visible;
this.getField("myTextField").value = "show this text";
And in the radio button with export value "Choice2" use that same line of script above like this:
this.getField("myTextField").display = display.hidden;
this.getField("myTextField").value = "";
Like you said there are many other ways to obtain the same result with javascript, but this is my prefer method in my PDFs.