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?
read up on some of these http://www.google.com/search?q=Changing+Select+Content+on+the+fly You can use ajax but there's no real reason to go back to the server for simple logic like this. Basic javascript will do the trick.