2 Replies Latest reply on Mar 30, 2016 2:10 AM by try67

    if

    klothos

      HELLO

      i use this

      if(event.value=="1") this.getField("Text1")

      if(event.value=="2") this.getField("Text1")

      if(event.value=="3") this.getField("Text1")

      if(event.value=="4") this.getField("Text1")

      if(event.value=="5") this.getField("Text1")

      if(event.value=="6") this.getField("Text1")

      if(event.value=="7") this.getField("Text1")

      How can i make it more simple.Something like this if(event.value=="1,2,3,4,5,6,7

      Thanks

        • 1. Re: if
          klothos Level 1

          sorry i forgot setFocus

          if(event.value=="1") this.getField("Text1").setFocus();

          if(event.value=="2") this.getField("Text1").setFocus();

          if(event.value=="3") this.getField("Text1").setFocus();

          if(event.value=="4") this.getField("Text1").setFocus();

          if(event.value=="5") this.getField("Text1").setFocus();

          if(event.value=="6") this.getField("Text1").setFocus();

          if(event.value=="7") this.getField("Text1").setFocus();

          How can i make it more simple.Something like this if(event.value=="1,2,3,4,5,6,7

          Thanks

          • 2. Re: if
            try67 MVP & Adobe Community Professional

            if (event.value>=1 && event.value<=7) this.getField("Text1").setFocus();