Can I apply javascript to checkboxes in order to show/hide individual radio buttons in a single radio button list?
Views
Replies
Total Likes
Hi,
Yes, it can be done. You just need to reference the actual button, rather than the radio button group.
It is best if you name the radio button group AND all of the individual radio buttons.
If the radio button group was named "myRadioButtons" and the three rb were named "yesRB", "noRB", and "maybeRB". All of this is in the hierarchy.
Then this script in the click event of the checkbox would work:
if (this.rawValue == 1)
{
myRadioButtons.maybeRB.presence = "hidden";
}
else
{
myRadioButtons.maybeRB.presence = "visible";
}
Hope that helps,
Niall
Views
Replies
Total Likes
Thanks, Niall,
I'll give it a try . . .
Yours,
Robert Anderson
SWRCB WebSupport
1001 I Street
Sacramento, CA 95814
8th floor 59B
(916) 341-5950
randerson@waterboards.ca.gov
>>> Niall O'Donovan <forums@adobe.com> 8/5/2010 1:47 PM >>>
Hi,
Yes, it can be done. You just need to reference the actual button, rather than the radio button group.
It is best if you name the radio button group AND all of the individual radio buttons.
If the radio button group was named "myRadioButtons" and the three rb were named "yesRB", "noRB", and "maybeRB". All of this is in the hierarchy.
Then this script in the click event of the checkbox would work:
if (this.rawValue == 1)
{
myRadioButtons.maybeRB.presence = "hidden";
}
else
{
myRadioButtons.maybeRB.presence = "visible";
}
Hope that helps,
Niall
Views
Replies
Total Likes