Adobe 8.0 custom calculation script for minimum value

This is simple in concept, but I can't figure out how to do it.  I'm working with forms in Adobe Acrobat Professional 8.1.1, and would like to subtract variable B from variable A (both input by the user into the form), and return a value of zero if the difference is negative, or the actual calculated value if the difference is positive.  However the Adobe website offers no help at all when it comes to writing script.  

Is there a simple calculation for this?  Does anyone know of a website that would give me sample javascript calculations for Adobe forms?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

b0lsc0ttIT ManagerCommented:

I am not an expert on working with Javascript in PDFs.  I can definitely provide lots of good sites with info for Javascript but that doesn't usually mean you can just easily apply it to the PDF file.  That is where I have the problem and little experience.

One of the sites I have found for help with it is .  The Developer section ( has areas and pages for scripting.   It is one of the best places I have found.

Let me know how that gets you going and what else you need.  Let me know if you have any questions or need more information.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JVauditorAuthor Commented:

You've been most helpful.  I was previously unaware of that site, and after a little searching, have been able to glean enough information to accomplish the task.  Thank you!

b0lsc0ttIT ManagerCommented:
Your welcome!  I'm glad I could help.  Thanks for the grade, the points and the fun question.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.