Can anyone help with code for this?

Discussion in 'JavaScript' started by frd, Jul 1, 2010.

  1. #1
    Can anyone help with code for this?

    We sell three kinds of cookies: Chocolate Chip, Oatmeal Raisin and Peanut Butter (CC, OR, PB) in a 2 Dozen (24) box. Customers can choose in groups of six which kinds they would like.

    As an example they could order:
    12 CC 6 OR 6 PB = 24 or...
    6 CC 6 OR 12 PB = 24 or...
    18 CC 0 OR 6 PB = 24 or...
    12 CC 12 OR 0 PB = 24

    Any combination of six as long as the total is 24.

    We want to have the LAST TWO selections in the drop down boxes to be the customers choice with the third drop down box automatically calculated so that it totals 24.

    Example: 12 CC, 6 OR, 6 PB selected already by customer with 6 PB being the last selection.
    Customer changes their mind and chooses 12 OR. We want to keep 6 PB, 12 OR and change CC to 6.
    Customer changes mind again and selects 12 CC. Since 12 OR is the last selection and they chose 12 CC, we want PB to change to 0.

    We want the customer to be able to continuously change their selection and have their last two selections remain and the third drop down box change automatically.

    Can anyone help with code for this?
     
    frd, Jul 1, 2010 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,841
    Likes Received:
    4,543
    Best Answers:
    123
    Trophy Points:
    665
    #2
    sarahk, Jul 9, 2010 IP