View Single Post
Old 09-21-2012, 11:20 PM   PM User | #4
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,556
Thanks: 62
Thanked 4,054 Times in 4,023 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Code:
		var orgTotal = (Ototal + Etotal);
// the var on the next line is BOGUS...you can't use var for the same name twice
// but in any case GET RID of this next line COMPLETELY:
		/* var orgTotal = orgTotal.toFixed(2); */ 

		grandTotal = Number(schoolTotal + orgTotal);
		if(isNaN(grandTotal)) {
			grandTotal = "";
		} else {
                        grandTotal = grandTotal.toFixed(2);
                }
		if(isNaN(orgTotal)) {
			orgTotal = "";
		} else {
                        orgTotal = orgTotal.toFixed(2);
                }
		document.getElementById("orgTotal").innerHTML = orgTotal;
		document.getElementById(orgType + 'total').innerHTML = total;
		document.getElementById(orgType + 'active').innerHTML = active;
		document.getElementById("schoolTotal").innerHTML = schoolTotal;
//	        document.getElementById("grandTotal").innerHTML = schoolTotal; ??? SURELY THIS IS WRONG ???
// shouldn't it be
		document.getElementById("schoolTotal").innerHTML = grandTotal;
red means kill it
blue means add it
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Users who have thanked Old Pedant for this post:
greenhat (09-28-2012)