Hello fellow coders, I have a problem I need some help on. I have to make an average calculator on a website with javascript wherre the average updates when values change in the input boxes.
Here is my code so far:
Code:
<!DOCTYPE HTML>
<html>
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
function calcAvg(Box1,Box2,Box3,Box4,Box5 ){
function preformCalc(Box1,Box2,Box3,Box4,Box5){
function calcAvg(){

functionCalcAvg(Box1,Box2,Box3,Box4,Box5/5){
return statement= AvgCalc
}
</head>
<body>
<form name="Average">
Box 1<input type="text" name="Box1"  value="0"  onchange=
"calcAvg(document.totalprice.value,document.calcAvg.Box1.value"><br>
Box2<input type="text" name="Box2"  value="0" onchange=
"calcAvg(document.calcAvg.value,documentcal.calcAvg.Box2.value"><br> 
Box 3<input type="text" name=" Box3"  value="0" onchange=
"cal_total(document.calcAvg.value,document.calcAvg.Box3.value"><br>
Box 4<input type="text" name="Box4"  value="0" onchange=
"cal_total(document.calcAvg.value,document.calcAvg.Box4.value"><br>
Box 5<input type="text" name="Box5"  value="0" onchange=
"cal_total(document.calcAvg.value,document.calcAvg.Box5.value"><br><br>
Result<input type="text" name="Result"  value="0" onchange=
"cal_total(document.calcAvg.value,document.calcAvg.Result.value
</form>
</body>
</html>