1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Help with Javascript in a pdf form

Discussion in 'JavaScript' started by Herns88, Mar 27, 2019.

  1. #1
    Hi! guys, I have a question about Javascript programming for pdf forms.

    I currently use the Adobe Pro DC, and I need to know how can I do 2 things:

    1º I need to know how to make that an ACTIVATE Check Box149 subtract 2 from the result of Text99 (in turn Text99 is obtained from Text88 * 2) … Basically what I want is that the Text99 value variable, every time you activate a Check Box149, 150, 151, etc … will be subtracted 2 to the Text99.

    2º The other question will come to see how we could do for the value of the Max box. 50 lb., will change the font to RED, if the value of the box is greater than 50, that is, Max 50 lb.> 50 then change to RED color.

    I have partially managed to come up with the “solution” for the 1st option but something is wrong …

    Basically when I enter a number in the Text88 box (example 10) it appears in Text99 20OffOffOffOffOffOff … (if I activate each Check Box149, 150, 151 … the Off set is removed and it is deducted 2). How could I make the Off disappear … I guess it should be putting true / false, check/cheked code with the checkBox.

    Thanks, to see if anyone knows how I can solve the issue and help me complete or correct the code.

    Here is the actual code that i wrote:

    if (this.getField(“Text88”).value !== this.getField(“Text99”).defaultValue) {

    event.value = this.getField(“Text88”).value * 2.0 + this.getField(“Check Box149”).value + this.getField(“Check Box150”).value + this.getField(“Check Box151”).value + this.getField(“Check Box152”).value + this.getField(“Check Box153”).value + this.getField(“Check Box153”).value + this.getField(“Check Box154”).value + this.getField(“Check Box155”).value + this.getField(“Check Box156”).value + this.getField(“Check Box157”).value + this.getField(“Check Box158”).value;

    } else {

    event.value = event.target.defaultValue;

    }

    Thank you.
     
    Herns88, Mar 27, 2019 IP
  2. Herns88

    Herns88 Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2

    Does anyone have an idea? I searched the internet, youtube, and I do not give with the key
     
    Herns88, Mar 30, 2019 IP