i think with out using else condition it is failing…
So add it, and see what happens
now too before entering password field only it is displaying the message “your password should be atleast 6 characters long”…
I know
That’s because you put that test first.
It’s not like javascript knows what you want, it just does what you tell it to do. Tell it to do what you want it to do.
What are the checks you want to do on the passwords? Make a list, and put them in the right order.
what we need to add then so that it should not display any alert message before entering in the password field…
If you click submit before entering the password, you don’t want to show any alert message?
exactly that is what i want
Ok, so add a new check to the email function (first check): if the email is empty, return false (but without any alert message).
i am getting an alert message for before inserting any value for password
not to email function…