I just started learning Javascript, so maybe this is doing exactly what it's supposed to be doing, but this is what I think is a problem.
I have a text box and submit button. I have a <p>
of text that is hidden.
IF the user's text entered is what I want it to be, the <p>
of text shows on submit.
ELSE (any other user's text), the text shows up, but
document.getElementById("id").innerHTML="Incorrect!";
document.getElementById("id").style.display="block;"
So, it works that if you enter the CORRECT word first, the <p>
shows up.
If INCORRECT, it shows up, but with different text, ie, "incorrect!" So far, so good...
THE PROBLEM: After you get the text wrong, you can't try again, you have to refresh.
If you get it right, the right text shows, if you enter something else in after, the proper <p>
follows, too, but if you try AFTER the wrong text is entered, it doesn't go back.
So once it's incorrect, you can't go back. So if someone got it wrong, and then put in the right word, they wouldn't be able to tell unless they refreshed and tried it again first.... Does this make sense? I hope I'm clear.