How about this case:
There are three different cases that could be true, 4 cylinders, 6 cylinders and 8 cylinders. I have created the 4, 6 and 8 as buttons, and created three circle objects as cyl4, cyl6 and cyl8. I want it so that when 4 is clicked it displays the circle object cyl4 and makes the others hidden, unless cyl4 is already visible then it will just make all three objects hidden. So far I have this code on each button click, modified for which objects should be set to visible on each one:
topmostSubform.Page1.Span[41].Fourcyl::click - (JavaScript, client)
if (cylinder == 4){
xfa.form.topmostSubform.Page1.cyl4.presence="hidden"
xfa.form.topmostSubform.Page1.cyl6.presence="hidden"
xfa.form.topmostSubform.Page1.cyl8.presence="hidden"
cylinder.value = 0
}
else{
xfa.form.topmostSubform.Page1.cyl4.presence="visible"
xfa.form.topmostSubform.Page1.cyl6.presence="hidden"
xfa.form.topmostSubform.Page1.cyl8.presence="hidden"
cylinder.value = 4
}
Where cylinder is just a control variable. It's probably something simple that I'm missing, any help would be appreciated.
Thanks