Title: [JavaScript] Still broken Author: ThermiteKitten Pastebin link: http://pastebin.com/iMF5DvMc First Edit: Thursday 1st of October 2015 12:46:29 PM CDT Last Edit: Thursday 1st of October 2015 12:46:29 PM CDT var $ = function (id) {     return document.getElementById(id); } var calculateTax = function () {     var subtotal = parseFloat($("subtotal").value);     var tax_rate = parseFloat($("tax_rate").value);     var isValid = true;       if (isNaN(subtotal)) {         alert("Subtotal must be numeric");     }     else if (isNaN(tax_rate)) {         alert("Tax rate must be numeric");     }     else if (subtotal <= 0) {         alert("Subtotal must not be negative");     }     else if (tax_rate <= 0) {         alert("Tax rate must not be negative");     }     else {         var sales_tax = calculateTax(subtotal, tax_rate);         $("sales_tax").value = sales_tax.toFixed(1);         var total = subtotal + sales_tax;         $("total").value = total.toFixed(1);     } } var clear = function () {     $("subtotal").value = "";     $("tax_rate").value = "";     $("sales_tax").value = "";     $("total").value = ""; } window.onload = function () {     $("calculate").onclick = calculateTax;     $("clear").onclick = clear;     $("subtotal").focus(); }