ok, i'm trying to get a return value of a float...... but it keeps giving me a load of numbers!
how do i make this interger behave?
the problem is line 39. thanks.
how do i make this interger behave?
the problem is line 39. thanks.
Code:
<script language="javascript1.2">
function checkreset()
{
if (confirm('Are you sure you wish to clear the form?'))
{
return true
}
return false
}
function addnumbers()
{
// This function reads the values from the input boxes
// parseFloat converts the input boxes into an integer
var x,y,result;
a = parseFloat(document.form1.abox.value);
b = parseFloat(document.form1.bbox.value);
c = parseFloat(document.form1.cbox.value);
d = parseFloat(document.form1.dbox.value);
e = parseFloat(document.form1.ebox.value);
f = parseFloat(document.form1.fbox.value);
g = parseFloat(document.form1.gbox.value);
h = parseFloat(document.form1.hbox.value);
i = parseFloat(document.form1.ibox.value);
j = parseFloat(document.form1.jbox.value);
// Then we do the math
result = a + b + c + d + e + f + g + h + i + j;
// And write the result straight to the screen
document.form1.qbox.value = result;
document.form1.totalbox.value = result*10.21;
// As the function has already done the output, we don’t need a return value
}
</script>
Comment