1 Reply Latest reply on Dec 20, 2017 1:57 PM by Thom Parker

    Question about custom button triggers and actions.

    shoomayker Level 1

      I want a button to do this:

      1) With single click on Field1 - hide Field1 and show Field2

      2) With single click on Field2 - hide Field 2 and show Field1

      3) With double click on Field1 - open a file


      Basically, I want to show and hide images throughout a PDF. I want the option between having the image appear on the document and being able to open the image in a new window.


      Any help? I very new to Javascript and cannot figure it out.

        • 1. Re: Question about custom button triggers and actions.
          Thom Parker Adobe Community Professional

          Hiding and showing fields is easy. But there is no double click event, so it has to be implemented as a script.


          So here is code for the mouseUp on Field1:


          this.getField("Field2").hidden = false;

          event.target.hidden = true;


          Here is the code for the mouseup on Field2


          this.getField("Field1").hidden = false;

          event.target.hidden = true;


          double click detection is outside the scope of this thread