Quantcast
Channel: Adobe Community : Unanswered Discussions - Acrobat
Viewing all articles
Browse latest Browse all 73766

Error in Javascript

$
0
0

Capture 12.PNGCode that is causing problem is in first field of the form below TOTAL, called "TSM"

 

This is the error:  Syntax error: missing ) before condition 9 at line 8

This is a link to a usable form (I think)  https://workspaces.acrobat.com/?d=eHgoPUbA1ZDY0TyH3CcHRQ

 

 

This is the code

 

var c = this.getField("TM")                                         //Gets total mileage from field "TM"

var d = this.getField("StandardCost")                        //Gets dollar amount from "StandardCost"

var e = this.getField("Cb")                                         //Gets value of Checkbox

 

if ((event.e.value = No)||(event.d.value!=0)){            //If the Checkbox is not checked and there the fee is greater than zero; Mileage X cost = "TSM"

event.value =c.value * d.value;

}

    else if{

      ((event.e.value = No)||(event.d.value=0)){           // if the fee is zero and Checkbox is not checked there is no value

            event.value = "";

    else if{

(event.e.value = Yes) {                                              //If the checkbox is checked the TSM field is not visible.

            TSM.hidden = true;

}


Viewing all articles
Browse latest Browse all 73766

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>