7 Replies Latest reply on Nov 4, 2013 11:47 AM by bcburnside

    Javascript

    bcburnside

      When I use this script in a calculated field in Acrobat  If the condition is met it works but every over field that enter brings up the message. How do I fix this?

       

       

       

           var TempRow1_2 = this.getField("TempRow1_2").value; if( TempRow1_2 > 41) {


      ; app.alert("Temp Out of Safe Range Corrective Action Required",1); }
        • 1. Re: Javascript
          try67 MVP & Adobe Community Professional

          Why are you using this as a calculation script, then? It should be a validation script of TempRow1_2 ... Just use event.value instead of getField().value ...

          • 2. Re: Javascript
            bcburnside Level 1

            First attempt and I adapted a script I found online.

            • 3. Re: Javascript
              bcburnside Level 1

              I changed it to the following in the Calculation tab. I can not use Validation tab because I do not want the information changed in the field. I just want the message to pop up. The trouble is once the message is triggered it comes up every time you enter another field. How do I stop this from happening.

               

              event.value = this.getField("TempRow2_2").value;

              if( event.value > 41) {

                                  ; app.alert("Temp Out of Safe Range Corrective Action Required",1);

              }

              • 4. Re: Javascript
                try67 MVP & Adobe Community Professional

                What exactly are you trying to achieve here?

                • 5. Re: Javascript
                  bcburnside Level 1

                  I am having them key a temmperture in the field that they have taken with a thermometer. If the temp they have taken is to high or to low depending on the criteria then the message popes up reminding them they need to key a Corrective Action in a nother part of the form.Temp.JPG

                  • 6. Re: Javascript
                    Test Screen Name Most Valuable Participant

                    When EXACTLY do you want a popup to appear? You need to define the rules to stop the popup coming when it isn't wanted.

                     

                    Once it has appeared what do you want to do (e.g. force a change, leave the value as entered...)

                    • 7. Re: Javascript
                      bcburnside Level 1

                      1.The popup would appear after they leave the temp field.

                      2.It would leave the value as entered with no further action. It's just a reminder to fill in the Corrective Action field.