HTML Code:
<script type="text/javascript">
function focus()
{
document.homepage.name.focus();
}
function checkall()
{
with(document.homepage)
{
// Check for blank fields
if ((name.value=="")||(password.value=="")||(name.length>20)||(password.length>20))
{
alert("Please complete all fields")
alert("Fields cannot contain more than 20 characters!")
return false;
}
else
{
alert("Welcome!");
return true;
}
}
}
</script>
</head>
<body onLoad="focus()">
<h1>Welcome to the Casino:</h1>
<p>Enter your Username and Password below.</p>
<form name="signin" method="post" action="login.php" onSubmit="return checkall()">
<table border="0">
<tr><td width="120">Username:</td><td><input type="text" name="name"></td></tr>
<tr><td width="120">Password:</td><td><input type="password" name="password"></td></tr>
<tr><td> </td></tr>
<tr><td colspan="2" align="center"><input type="Submit" name="submit" value="Submit"><input type="Reset" name="reset" value="Reset"></td></tr>
</table>
</form>
Reposted the code because the tags didnt work the first time.
Bookmarks