<html>
<title>application</title>
<style type= text/css>
<!--
style1
font-family: Arial, Helvetica, sans-serif;
color: =00000000;
}
-->
</style>
<head><script language="JavaScript">{
function upper( field )
{
field.value = field.value.toUppercase();
}
<!--
function validate()
{
var good = true;
with( document.theForm )
{
if( id.value =="")
{
alert("Please provide a student number combination of NUMBER and letter ex. NG08500231");
good = false;
}
if( firstname.value =="")
{
alert("Please provide first name.");
good = false;
}
if ( lastname.value =="")
{
alert("Please provide last name.");
good = false;
}
if course.value =="")
{
alert("Please provide course");
good = false;
}
if year.value =="")
{
alert("Please provide year");
good = false;
}
}
return (good);
}
//-->
</script>
</head>
<body color="grey">
<form action="" method="POST" name="TheForm" class style1 on submit="JavaScript: return( validate() );">
<b><font color=red></b>
<h2><b>STUDENT FORM</b></h2>
<b>Enter your student ID: <input type=teat name="id" size=15 onKeyUp="JavaScript: upper(this);"><br>
<b> Enter your First Name: <input type=text name="firstname" size=15 onKeyUp="Javascript: upper(this);"><br>
<br> Enter your Last Name: <input type=text name="lastname" size=15 onKeyUp="Javascript: upper(this);"><br>
<br> Course: <input type=text name="course" size=15 onKeyUp="Javascript: upper(this);"><br>
<br> Year: <input type=text name="year" size=15 onKeyUp="Javascript: upper(this);"><br>
<br>
<input type=submit name"submit" value="Submit!">
<input type=reset name= reset value="Reset!">
</form>
</body>
</html>
>the submit button and alert boxes doesnt work please help
darylglenng 0 Newbie Poster
imBaCodes 2 Junior Poster
masterjiraya -3 Junior Poster
jwer 0 Newbie Poster
radhakrishna.p 29 Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.