hi all,
i was doing this coding and i get an error but i dont know what my error is could you please help me
thanks in advance
<html>
<head> <title> Student Final Results </title>
<style>
Inline Code Example Here`Inline Code Example Here`
background: #f3f3f3 url('22.gif');
}
</style>
<script type="text/javascript">
function student()
{
var name = document.getElementById("name").value;
var number = parseInt(document.getElementById("number").value);
var pr1 = parseInt(document.getElementById("pr1").value);
var pr2 = parseInt(document.getElementById("pr2").value);
var cr1 = parseInt(document.getElementById("cr1").value);
var op1 = parseInt(document.getElementById("op1").value);
var op2 = parseInt(document.getElementById("op2").value);
var cr2 = parseInt(document.getElementById("cr2").value);
var da1 = parseInt(document.getElementById("da1").value);
var da2 = parseInt(document.getElementById("da2").value);
var cr3 = parseInt(document.getElementById("cr3").value);
var prResult = getResult (pr1, pr2);
var opResult = getResult (op1, op2);
var daResult = getResult (da1, da2);
var gpa = ((((pr1 + pr2 )*cr1) + ((op1 + op2)*cr2)) + ((da1 + da2)*cr3)/ (cr1+cr2+cr3));
var output = "Dear student " + name + " number " + number ;
var programing = "\n \n programing 1 Result is: " + prResult;
var OperatingSystems = "\n \n Operating Systems Result is: " + opResult ;
var DataStructure = "\n \n Data Structures Result is: " + daResult ;
var date = "\n \n this Report is created on : " + date();
document.getElementById("result").value = output + programing + OperatingSystems + DataStructure
}
function getResult(exam1, exam2)
{
r = exam1 + exam2;
var degree = "";
if(r >= 90)
{
degree = "excellent"
}
else if(r >= 80)
{
degree = "very good"
}
else if(r >= 70)
{
degree = "good"
}
else if(r >= 60)
{
degree = "pass"
}
else
{
degree = "fall";
}
return degree;
}
</script>
</head>
<body >
<form id="myForm">
<p> <font face="verdana" size= "5" color="green"> <b> Student Final Results </b> </font> </p>
<label> Student's Name: </label> <input type=”text” id="name" size=”6”/>
<label> Student's Number: </label> <input type=”text” id="number" size=”6”/>
<br><br>
<label> programming 1 </label>
<br><br>
<label> Mid-term Exam: </label> <input type=”text” id="pr1" size=”4”/>
<label> Final Exam: </label> <input type=”text” id="pr2" size=”4”/>
<label> Credits </label> <input type=”text” id="cr1" size=”4”/>
<br><br>
<label> Operating Systems </label>
<br><br>
<label> Mid-term Exam: </label> <input type=”text” id="op1" size=”4”/>
<label> Final Exam: </label> <input type=”text” id="op2" size=”4”/>
<label> Credits </label> <input type=”text” id="cr2" size=”4”/>
<br><br>
<label> Data Structures </label>
<br><br>
<label> Mid-term Exam: </label> <input type=”text” id="da1" size=”4”/>
<label> Final Exam: </label><input type=”text” id="da2" size=”4”/>
<label> Credits </label> <input type=”text” id="cr3" size=”4”/>
<br><br>
<input type="button" onclick = "getResult(exam1, exam2)" value = "Get Result"/>
<input type="reset" value="clear All" />
<br><br>
<textarea id="result" cols=80 rows=15>