I'm trying to create a simple javascript calculation script, but for some reason can't get it work.
function calculate() {
var USERINPUT1 = document.TESTING.INPUT1.value,
RESULT = USERINPUT1 + (USERINPUT1 * .05);
document.TESTING.OUTPUT1.value = RESULT;
}
<form name="TESTING">
<table border="1" width="600" height="200" cellpadding="10" cellspacing="3">
<tr>
<th colspan="2">
<h1>5% TAX CALCULATOR</h1>
</th>
</tr>
<tr>
<th>
<h3>ORIGINAL PRICE</h3>
</th>
<th>
<h3>ORIGINAL PRICE + 5% TAX</h3>
</th>
</tr>
<tr>
<td>
<input type="number" name="INPUT1" id="input" onchange="calculate();" />
</td>
<td>
<input type="number" name="OUTPUT1" id="output">
</td>
</tr>
</table>
</form>
When I enter 100 into INPUT, the OUTPUT becomes 1005, but it should be 105.
Could you please point out where the mistake is? Thank you!