![]() |
Login Form in Javascript
Hey guys i am trying to create a login form with html and javascript and everything is working except that i am not able to implement maximum attempts to this. It tried nested ifs and for too but didn't succeed:mad:.In the below code i am trying to implement maximum 3 attempts of wrong username or password.
Code:
<html> |
I think this is probably a homework exercise because in the real world there is no way you should be using javascript to count login attempts because it can be very easily bypassed.
If you want to count login attempts properly, then you should be doing this server side with a server side language like PHP etc. |
There is no point in imposing a limit to the number of password attempts as the user can simply close the page, reopen it and start again.
But to make your code work you need to use a for loop. |
There is no point in imposing a limit to the number of password attempts as the user can simply close the page, reopen it and start again.
And be aware that anyone can see the correct password with View Source. But to make your code work you need to use a for loop. |
Quote:
|
If you really need to do this with javascript you can use a do-while loop and/or cookies. But as I said, doing this with javascript is no-no in the real world.
|
Quote:
|
Quote:
|
Code:
<html> |
dude it worked.....:thumbsup:
how do get these things done? i mean how do u get ideas? |
| All times are GMT +1. The time now is 12:15 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.