I’ve done this script that basically needs to prompt a student for their student number and student name, and to make sure the student number is between the range of 1 and 500 and if not, warn them that it is not in the correct range. The program would then display students username followed by a hyphen and then their student number (example: j-10292)
this is as far as i have got so far, however it doesnt seem to be loading in my browser and i cant understand why?:
[CODE]<!–
import java.awt.*;
import java.applet.Applet;
public class test extends Applet
{
public void Studentname()
{
var student_name;
student_name = window.prompt(“Please enter your student name”, “”);
var student_number;
student_number = window.prompt(“Please enter your student number”, “”);
student_number = Integer.parseInt(student_number);
if ((student_number =>500) ||(student_number =<0))
{
document.write(‘Please enter a number between the range of 1 and 500.’);
}
else
{
student_number = window.prompt(“Your Student Number is”, “” + student_number);
}
}
}
/–>