Javascript Checkboxes formula? Help?

Discussion in 'JavaScript' started by Nectarine, Oct 1, 2009.

  1. #1
    Hey all,

    I've been racking my brain to come up with this. It's part of a larger formula in JavaScript.

    Basically:

       if 0, 5%
       if 1, 6%
       if 2 or more selected, 6.5%
    Code (markup):
    I'm trying to create a self-help financial form as part of a pet project. It takes variables and comes up with a percentage based on the number selected. So if two boxes are checked, it will go up to 6.5%, but it will drop to 5% if none are. 6% will be the default, but I'd like to set a number to it in the script (1).

    I've whipped up the whole form in Excel but am having trouble with this one segment -- especially since I'll need it in HTML!
     
    Nectarine, Oct 1, 2009 IP
  2. Nectarine

    Nectarine Peon

    Messages:
    132
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Figured it out, thanks anyway.
     
    Nectarine, Oct 1, 2009 IP