I have a Javascript calculator in which users can enter quantities of products/features, and it will multiply the quantity by the set price. Then, the result shows in a textbox below. My 2 questions are:
<select>
options and specify a value for each one like this: <select name="SITE_EM_4.99" onChange="CalculateTotal(this.form)">
<option value=""> - Select - </option>
<option value="1">Yes</option>
<option value="0">No</option>
</select>
However, it won't let me do the same with checkboxes/radio buttons. How can I do that?
Two: Can I change the script so the total shows as actual text, vs in a text field? THANKS!
P.S. The script can be found HERE.
instead of having an input for the total just switch to a span (or something else) with an id (let's say "total"), and just replace it with innerHTML
<script>
function CalculateTotal(frm) {
...
document.getElementById('total').innerHTML = round_decimals(order_total, 2);
...
}
</script>