www.webdeveloper.com
Results 1 to 2 of 2

Thread: Code help please!

  1. #1
    Join Date
    Mar 2011
    Posts
    1

    Question Code help please!

    Hi All!!

    First off, I am not a javascript super user at all. I know very little.

    Here is my problem.

    I have created a fill-in PDF, and I need to have one of the fields automatically calculate a number. What I would like to have happen is this: An if..then..else based on finding the minimum of 3 numbers. In layman's terms:

    if...
    minimum(a,b,c)<0
    then...
    0
    else...
    minimum(a,b,c)

    Any help would be greatly appreciated!!

    Thank you!!!!

  2. #2
    Join Date
    Feb 2011
    Location
    israel
    Posts
    157
    how about this:
    Code:
    var low = Math.min(a,b,c);
    if (low < 0)
    {
    low = 0;
    }
    else
    {
    low = low;
    }
    here's how it works:
    http://jsfiddle.net/moritana/ZNUJA/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles