Basicly i need to create a page, where a popup at the start asks for student name, subject and then mark (all 3 seperate)
this is then displayed in a table , though a 4th column which using the if statement will display weather they pass or fail (50 is a pass, less is a fail)
now i have something pretty similar along the lines for what i need that i can modify (i know all i need to do is switch a few lines around)
<html>
<head>
<title>Total Price</title>
<script type=”text/javascript”>
var count=0, itemDescription, price;
var sum=0, avg;
itemDescription=prompt(“Input the item type quit to end”,””);
document.writeln(
“<table border = “1” width = “100%”>” );
document.writeln(
“<caption>Calculating Total Price of Items</caption>” );
document.writeln(
“<thead><tr><th align = “left”>Index</th>” );
document.writeln(
“<th align = “left”>Item description</th>” );
document.writeln(
“<th align = “left”>Price</th>” );
while(itemDescription!=”quit”)
{
count++;
price=prompt(“Input the price eg 2.45″,””);
price=parseFloat(price);
sum+=price;
document.writeln(
“<tr><td>”+count+”</td><td>”+itemDescription+”</td><td>”+price+”</td></tr>”);
itemDescription=prompt(“Input the Item Description type quit to finish”,””);
}
avg=sum/count;
document.writeln(“<tr><td>The Total price is</td><td></td><td>”+sum+”</td></tr>”);
document.writeln(“<tr><td>The average is</td><td></td><td>”+avg+”</td></tr>”);
document.writeln(“</table>”);
</script>
<link href=”cssFile.css” rel=”stylesheet” type=”text/css”>
</head>
<body>
</body>
</html>
thanks in advance (this has really got me stumped)