Why the javascript code is not running in this example?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script language="javascript" type="text/javascript">
function check()
{
if(f1.form_name.value="")
{
alert("Please Insert the name!!!");
}
else if(f1.form_user_id.value="")
{
alert("Please Insert the USER ID!!!!(MUST)");
}
else if(f1.form_password.value="")
{
alert("Please Insert the PASSWORD(MUST)");
}
else if(f1.form_password1.value="")
{
alert("Please Insert the PASSWORD again(MUST)");
}
else if(f1.form_password.value!=f1.form_password1.value)
{
alert("please Check your password");
}
else if(f1.form_email__id.value="")
{
alert("please insert the Email");
}
else if(f1.form_email_id.value<5)||(f1.form_email_id.value.indexOf('@')==-1)||(f1.form_email_id.value.indexOf('.')==-1))
{
alert("please insert the valid Email address");
}
}
</script>
</head>
<body bgcolor="#FFCCCC">
<form action="register2.php" method="post" name="f1" >
<table width="100%" border="0">
<tr>
<td height="45" colspan="20"><div align="center">Enter your description </div></td>
</tr>
<tr>
<td width="5%"> </td>
<td width="5%"> </td>
<td width="1%"> </td>
<td width="8%">Name</td>
<td width="17%"><input type="text" name="form_name" /></td>
<td width="1%"> </td>
<td width="1%"> </td>
<td width="1%"> </td>
<td width="5%"> </td>
<td width="5%"> </td>
<td width="9%"> </td>
<td width="1%"> </td>
<td width="5%"> </td>
<td width="5%"> </td>
<td width="5%"> </td>
<td width="5%"> </td>
<td width="5%"> </td>
<td width="5%"> </td>
<td width="5%"> </td>
<td width="6%"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td>UserId</td>
<td><input type="text" name="form_user_id" /></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td>Password</td>
<td><input type="password" name="form_password" /></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td>Confirm Password </td>
<td><input type="password" name="form_password1" /></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td>Address Line1 </td>
<td><input type="text" name="form_address_line1" size="45"/></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td>Address Line2 </td>
<td><input type="text" name="form_address_line2" size="45"/></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td>City</td>
<td><input type="text" name="form_city" /></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td>Country</td>
<td><input type="text" name="form_country" /></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td>Zip/Postal Code </td>
<td><input type="text" name="form_pin" /></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td>Gender</td>
<td><select name="Gender">
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td>Age</td>
<td><input type="text" name="form_age" size="5"/></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td>Email</td>
<td><input type="text" name="form_email__id" size="45"/></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td>Phone Num </td>
<td><input type="text" name="form_phone" /></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td>Card Type </td>
<td><input type="text" name="form_card_type" /></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td>Card Number </td>
<td><input type="password" name="form_card_number" /></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td>Cart Expiry Date: </td>
<td><input type="text" name="form_card_expiry_date" /> mm/dd/yyyy</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td><input type="submit" name="Submit" value="Submit" onmouseup="check()"/></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</form>
</body>
</html>
:-/ :sad: :@