can someone please help correct this script, thank you.

T

thank you

below is a script i have made up and i can not seem to get the number to add
up, it is the last line, for.total...... that i think is not right, it
should add the numbers together, not add then as a string.

thank you in advance for your help.




<script language="JavaScript"><!--
function Morgcal()
{
form = document.myform
sum1= form.num1.value
sum2= form.num2.value
sum3= form.num3.value
sum4= form.num4.value

sum=0

ctotal=(sum1)
ctotal=ctotal+(sum2)
ctotal=ctotal+(sum3)
ctotal=ctotal+(sum4)

form.total.value=Math.floor(ctotal)
}
// --></script>
 
T

thank you

sorry I know now that I posted it in the wrong newsgroup, it was the next
one down in my list.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top