These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Subtracting in Calculate. Using acrobat 5

frog55
Registered: Feb 5 2010
Posts: 3

Var f = this.getField("ValueA");
Var g = this.getField("ValueB");
event.Value = f.Value - g.Value;

I'm getting a syntax error: missing ; before statement at line 1

What am I donig wrong?

My Product Information:
Acrobat Standard 5.x or older, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
Check the spelling and capitalization of statements, field names, properties, methods, etc.

With the names you have used for your variables, you can use the 'Simplified Field Notation'.
ValueA - ValueB
The JavaScript statement for defining a variable is 'var', the property for the value of an object is 'value'.
var f = this.getField("ValueA");var g = this.getField("ValueB");event.value = f.value - g.value;

There are many articles, tutorials, eSeminars on demand at this site that can help you learn how to use Acrobat forms and add interactive to the forms.

George Kaiser