Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

login form looking for help - please

Status
Not open for further replies.

newbiedude77

Programmer
Feb 21, 2012
1
0
0
IE
Hello Im looking for help with my login form...So far I have coded that if I put in the correct password and username then I will getinto my site. I would like to have something whereby if I put in 3 failed attempts I get a message each time telling me how many attempts I have left and then no access.
After every failed attempt I want the textbox to clear aswel so i can enter in the next attempt......Thanks guys

All help would be very helpful...I have tried this for a few days now with success ......

here is my cose so far

<script language="javascript">

function passuser(form)
{
if (form.user.value=="tony" &&form.password.value=="hello")
{
window.alert("Hello tony")
location='
}
}
</script>
</head>

<body><center><br />



<form action="name" method="get">
<table width="300" height="200" border="1" cellpadding="5"cellspacing="5">
<tr>
<th colspan="2" scope="col"bgcolor="#6699FF"><center>LOGIN FORM</center></th>
</tr>
<tr>
<td width="120" align="center"> User Name</td>
<td width="140"><label>
<input type="text" name="user" id="user" />
</label></td>
</tr>
<tr>
<td align="center">Password</td>
<td><label>
<input type="password" name="password" id="password" />
</label></td>
</tr>
<tr>
<td align="center"><label>
<input type="reset" name="cmdClear" id="cmdClear" value="Reset" />
</label></td>
<td align="center"><label>
<input type="submit" name="enter" id="log" value="Login" onclick="passuser(this.form)" />
</label></td>
</tr>
</table>
</form>
</center>
</body>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top