Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

subtraction

Community Beginner ,
Oct 10, 2016 Oct 10, 2016

I've been trying a JavaScript that computes the remaining balance. 

The customer picks a package which assigns a price to the subtotal and when the customers enter a deposit it should generate the remaining balance.  I've tried this javascript

var t = getField(“Price”).value;

var d = getField(“Deposit”).value;

event.value = t - d;

but it is not working.

Is there anything wrong with the JavaScript?  Please help!!

TOPICS
Acrobat SDK and JavaScript , Windows
314
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 10, 2016 Oct 10, 2016

If those field names are correct, the field calculation order is correct, and you placed the code as a custom calculation script, it should work. You can check the JavaScript console for errors by pressing Ctrl + J.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 10, 2016 Oct 10, 2016
LATEST

You're using non-standard quotes. Use only straight quotes, either doube ( " ) or single ( ' ).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines