Note: parentheses have been replaced with brackets
Summary: form contains a combo box and a quantity field. Multiply both field for a total only works when a client side event alert[$[combobox_name]] or alert[$[quantity]] field is used.
Meaning, the Total field doesn't total unless these alerts are in place.
Details:
field_A: combo box
combo box entry: 10ft
combo box value= 50.00
field_B: quantity text field = user defined value
field_C: HTML Total field
field_D: hidden_total (default value = 0)
Client-side event for combo box:
$[field_D] = [parseInt[$[field_B]]*parseInt[$[field_A]]].toFixed[2]
alert[$[field_D]]
document.getElementById['ItemTotal'].innerHTML = '{B}Total: ' + formatCurrency[$[field_D]] + '{/b}'
Without the alert($(...) the Total will not calculate after populating each field. With the alerts and populating the fields the pop-ups contain the correct amount and the HTML total field displays the correct calculated amount.
Why?