POINTS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!? I cant get my stupid program to run
i need it to display different outputs depending on the x variable
this is my program :
<html>
<head>
<title> Control Structures </title>
<script language="javascript">
var fullname=null;
var mark,x=null;
var nl="<BR>"
fullname = prompt("Please enter your first and last name");
mark = prompt("Please enter your score in this course - ICS3M");
alert("Welcome to my Website" + " " + fullname + "\n" + " " + "Your score is" + " " + mark);
</script>
</head>
<body>
<center>
<h1>
<script language="javascript">
document.write("Hi" + " " + fullname +nl);
document.write("Your score is" + " " + mark +nl);
if(x < 50 ) {
document.write("You are at level zero. You FAIL" + nl);
} else if( x==50) {
document.write("Your score is exactly PASSING");
} else(x > 50 ) {
document.write("You are at level 1");
}
</script>
</html>
The alert box part of the porgram works perfectly, its just these if statements that write on the page =/
The output on the actual page is blank =/
any ideas?
still doesn't work, only displays the first option, the youre under 50 you fail one =/
i need it to display different outputs depending on the x variable
this is my program :
<html>
<head>
<title> Control Structures </title>
<script language="javascript">
var fullname=null;
var mark,x=null;
var nl="<BR>"
fullname = prompt("Please enter your first and last name");
mark = prompt("Please enter your score in this course - ICS3M");
alert("Welcome to my Website" + " " + fullname + "\n" + " " + "Your score is" + " " + mark);
</script>
</head>
<body>
<center>
<h1>
<script language="javascript">
document.write("Hi" + " " + fullname +nl);
document.write("Your score is" + " " + mark +nl);
if(x < 50 ) {
document.write("You are at level zero. You FAIL" + nl);
} else if( x==50) {
document.write("Your score is exactly PASSING");
} else(x > 50 ) {
document.write("You are at level 1");
}
</script>
</html>
The alert box part of the porgram works perfectly, its just these if statements that write on the page =/
The output on the actual page is blank =/
any ideas?
still doesn't work, only displays the first option, the youre under 50 you fail one =/