2 Replies Latest reply on Dec 19, 2012 11:48 AM by tonymorecarrot

    How to assign same javascript to mutually-exclusive checkboxes?

    tonymorecarrot

      Hello,

       

      I have 2 mutually-exclusive checkboxes in an Acrobat X pdf form. Checking either box needs to hide a set of text fields. I've assigned the same javascript to both checkboxes, but the fields only hide if the 1st box is checked. Nothing happens when the 2nd box is checked. Any ideas? here's the script I've used (not knowing anything about javascript!):

       

      var showHide = event.target.isBoxChecked(0)?display.hidden:display.visible;

       

       

      this.getField("Joint Address 1").display = showHide;

       

      this.getField("Joint City 1").display = showHide;

       

      this.getField("Joint State 1").display = showHide;

       

      this.getField("Joint Zip/Postal Code 1").display = showHide;

       

      this.getField("Joint Country 1").display = showHide;