This code that I wrote is meant to call the calculateInterest
function and return false. However, the page does not appear to call the function or return false. Thank you for the help.
HTML
<form onsubmit="return calculateInterest(); return false;" id="interest_calc" name="interest_calc" method = "get";>
...
<input type="submit" id="calculate" value="Calculate">
<input type="button" id="calculate" value="test" onclick="return calculateInterest();">
</form>
JS
var $ = function (id)
{
return document.getElementById(id);
};//DOM function
...
//DEBUG alert (iPercentage);
var calculateInterest; = function ()
{
alert ("function called");
return false
};