Hi folks,
Really sorry - this is probably the most basic javascript coding but Ive just started as part of a planner that calculates values using values in different form fields.
I cant however, get form field 1's value to add with form field 2's value.
eg.
A=10
B=12
When I try put A+B together in C, it displays "1012" instead of "22".
I know this is probably absolute basic JS, but can anyone give me some pointers please? :rolleyes:
<script type="text/javascript">
function convert(fuel)
{
A=document.form1.f1.value
F=document.form1.f1.value * 1.15
G=document.form1.f2.value=Math.round(F)
T=document.form1.tblock.value=Math.round(A+G)
}
</script>
Thanks.