javascript form - error when hitting enter

I am working on a landing page that has a contact form made with javascript. It connects to my Email Service Provider. If someone enters in the three fields correctly, the info passes to my ESP just as it should. However, if someone hits the "enter" key too early, they get taken to another page with an error message. I would like an alert to display instead, that says what fields the person needs to fill out before they will be able to submit.

The page is available here:

Thank you,
Joshua FrazierMarketing Manager / Creative ServicesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You have no field with id="LastName".  So, somewhere around line 242, try changing:
function checkRequired(errors) {
	var reqfieldsString = "FirstName,LastName,PhoneNumber";

Open in new window

function checkRequired(errors) {
	var reqfieldsString = "FirstName,PhoneNumber";

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Joshua FrazierMarketing Manager / Creative ServicesAuthor Commented:
Yes! That did the trick! Thank you so much, I can't believe I didn't see that.
Joshua FrazierMarketing Manager / Creative ServicesAuthor Commented:
Thank you so much for your help!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.