[CODE]<html>
<head>
<title>You must login first before you order any book</title>
<script language=Javascript type=”text/javascript”>
function checkname(x)
{
if(x.value==””){
window.alert(“you must enter a username”)
x.focus()
}
}
function checkpass(y)
{
if(y.value==””){
window.alert(“you must enter a password”)
y.focus()
}
}
</script>
</head>
<body>
<a href=”homepage.html”> Back To Home</a>
<form name=reg method=”POST” action=”login.php”>
<p> </p>
<p><b><font size=”5″>
You must login first before you order any book</font></b></p>
<p>
Username
<input type=”text” name=”username” size=”20″ onblur=”checkname(this)”></p>
<p>
Password <input type=”text” name=”password” size=”20″ onblur=”checkpass(this)”></p>
<p> <input type=”submit” value=”Submit” name=”B1″> <input type=”reset” value=”Reset” name=”B2″></p>
</form>
</body>
</html>
my problem is once the error message pop up,unable to stop it ,it will loop foever.How to edit this code?