1

Please take a look at the following URL: http://jsfiddle.net/XBtgD/2/.

The additions are working fine, however the multiplication part doesn't add up at all.

Any ideas on how to get the multiplication working along with the additions?

Any help would be greatly appreciated.

0

3 Answers 3

2

You have class="sum" for you sums, but you are missing class="mult" for the multiple inputs.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the code. However there's still an issue. The multiplication should only be for the 2nd options. The total for the multiplication is shown at the complete bottom right before the grand total. This bit does not add up at all, and always remains at 0. Any idea on how to make the input.mult add up together only and show the result inside the class="wm-options"? At the end, the grand total should be the sum of the 1st options and the 2nd options.
1

Need the :checked

function calcWM() { var a = parseInt( $('input:radio[name=package]:checked').val()); alert(a); var b = parseInt( $('input:radio[name=job]:checked').val()); var c = parseInt( $('input:radio[name=months]:checked').val()); a = isNaN(a) ? 0 : a; b = isNaN(b) ? 0 : b; c = isNaN(c) ? 0 : c; wmValue = a * b * c; } 

Comments

0

For starters there are no inputs with class "mult", and I suppose the multiplication function should do a

total *= parseInt(value) 

...instead of a

total += parseInt(value) 

1 Comment

Thanks for your reply, as mentioned to Joe Tuskan above: The multiplication should only be for the 2nd options. The total for the multiplication is shown at the complete bottom right before the grand total. This bit does not add up at all, and always remains at 0. Any idea on how to make the input.mult add up together only and show the result inside the class="wm-options"? At the end, the grand total should be the sum of the 1st options and the 2nd options.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.