I’m learning JavaScript and heard that document.getElementbyId() is quite useful.
So, I thought that I might make a form-checker that checks if the form field is blank.
For some reason the alert() calls are not showing.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You are only testing if the textbox object is null. Not if the value in the HTMLInputElement is empty.
What you need is: