My Javascript multiplication example :
function calculate()
{
var NUMBER_1 = document.getElementById("NUMBER_2017").value;
var NUMBER_2 = 34;
document.getElementById("AMOUNT").value = NUMBER_1 * NUMBER_2;
}
Calculation code from the example :
<input type="text" name="NUMBER_2017" id="NUMBER_2017" onkeyup="calculate()" />
<input type="text" name="AMOUNT" id="AMOUNT" value="">
My calculation (my code)
<input type="text" name="NUMBER_2017" value="<%=rsDATABASE("NUMBER_2017")%>" onKeyUp="calculate()" ></td>
<input type="number" size="12" value="<%=rsDATABASE("AMOUNT")%>" NAME="AMOUNT" >/td>
I must become 2x VALUE (in bold) to insert in the database tabel.
The question is how ?
Thanks for tip - Leif
function calculate()
{
var NUMBER_1 = document.getElementById("NUMBER_2017").value;
var NUMBER_2 = 34;
document.getElementById("AMOUNT").value = NUMBER_1 * NUMBER_2;
}
Calculation code from the example :
<input type="text" name="NUMBER_2017" id="NUMBER_2017" onkeyup="calculate()" />
<input type="text" name="AMOUNT" id="AMOUNT" value="">
My calculation (my code)
<input type="text" name="NUMBER_2017" value="<%=rsDATABASE("NUMBER_2017")%>" onKeyUp="calculate()" ></td>
<input type="number" size="12" value="<%=rsDATABASE("AMOUNT")%>" NAME="AMOUNT" >/td>
I must become 2x VALUE (in bold) to insert in the database tabel.
The question is how ?
Thanks for tip - Leif