If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

help me please !!!!

can someone please help me as I need to code a java script password 3 attempts then locked out help I keep messing up when I did get it to work it looks nothing like the persudo code help me please!!!!

STOP using $ prefix on JavaScript variable names...
Please remember to wrap any code you have in forum tags:- [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]If you can't think outside the box, you will be trapped forever with no escape...

Couple of comments first:
1. Not a good idea to write passwords into JS as it just takes a 'view source' to read them.
2. Prompt is not the best way to collect the password information. Consider using an <input type="text" ...>
3. Review your books or tutorials to see how to write comments into your code.
4. Most programmers start the count from zero to represent no attempts have occured.
It will prove helpful to you to know this when you start to play with array elements.
5. alert(msg) is OK for testing, but you should consider a different method to inform the user of problems or success.
6. If you plan on passing this off as your own code to an instructor, be prepared to defend it and the logic.
7. For the forum members you should enclose your script betwee [ code] and [ /code] tags (without the spaces).

By default login attempts should be limited to 3 attempts then an error page displayed.

Job done, no javascipt needed and its secure.

Last edited by \\.\; 01-30-2014 at 08:05 PM.

STOP using $ prefix on JavaScript variable names...
Please remember to wrap any code you have in forum tags:- [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]If you can't think outside the box, you will be trapped forever with no escape...