I am deriving two different values from these scripts.
[B]Script #1…
[CODE]//JS for Potential Gen Ed TOC
$(function($) {
$(‘#CourseMenu select’).change(function() {
var sum = 0;
$(‘#CourseMenu select’).each(function(idx, elm) {
sum += parseFloat(elm.value, 10);
});
$(‘#total_potential’).html(Math.min(sum,72).toFixed(2));
});
});
[B]Script #2…
[CODE]//JS for Potential Gen Ed TOC from Electives only
$(function($) {
$(‘#CourseMenu_Electives select’).change(function() {
var sum = 0;
$(‘#CourseMenu_Electives select’).each(function(idx, elm) {
sum += parseFloat(elm.value, 10);
});
$(‘#total_potential’).html(Math.min(sum,33).toFixed(2));
});
});
[B]However, I’d like to pull the data from both of these and have the result display in the following HTML…
[code=html] <p><fieldset id=”PotentialTOC”>
<legend style=”font-weight: bold; font-size: 140%;”>Potential TOC Evaluation Results</legend>
<div id=”Results” style=”text-align:left; font-family: ‘Century Gothic’, Gadget, sans-serif; font-size:14px;”><br />
<div>
<h2><span id=”span”></span>
Potential Gen Ed TOC: <span id=”total_potential”></span>
<br />
Potential Money Saved: $<span id=”total_money”></span>
<br />
Potential Class Time Saved: <span id=”total_time”></span> weeks
</fieldset></p>
Here’s a [URL=”http://jsfiddle.net/jlnewnam/fhL3s/1/”]jsfiddle