1 Reply Latest reply on Aug 16, 2012 9:05 PM by George_Johnson

    Hidden fields in Adobe using Java

    rodneyfleming Level 1



      I am trying to write a script that will hide a certain field based off the value inserted in another field.


      I have started with this:


         var show = true;

         if(this.getField("quantity1").value.length == 0)   show = false;


         if(show)   this.getField("linetotal1").value = display.visible;

         else   this.getField("linetotal1").display = display.hidden;


         event.value = this.getField("quantity1").value * this.getField("unitprice1").value;


      Now, when there is no value inserted in "quantity1", then the correct field "linetotal1" is hidden.  The problem I am having is the field is staying hidden if I go back and put a value in "quantity1".


      Is there a way to have a loop or another if statement to correct this problem? Or is there a better way to do this action all together?


      Thanks in advance,