Calculation on home page using HTML oninput/onoutput