It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

onblur problem,please help

onblur problem,please help

Postby cty on Sun Mar 25, 2007 2:05 pm

Code: Select all
<html>

<head>




<script language=Javascript type="text/javascript">

function checkname(x)
{

if(x==""){
window.alert("you must enter a username")


reg.username.select()
reg.username.focus()


}

}


function checkpass(y)
{

if(y==""){
window.alert("you must enter a password")
reg.password.select()
reg.password.focus()

}


}
</script>

</head>
<body>


<form  name=reg method="POST" action="login.php">
   <p>&nbsp;</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(document.reg.username.value);"></p>
   
   <p>Password
   <input type="text" name="password" size="20"
      onblur="checkpass(document.reg.password.value);"></p>
   
</form>

</body>

</html>
cty
 
Posts: 0
Joined: Sun Mar 25, 2007 1:30 pm

Who is online

Users browsing this forum: No registered users and 8 guests