Browser Form Validation Problem

Hi folks!

I am having a problem getting a mail form to validate in IE.  Please visit:

http://www.mattcashatt.com/contact.php

Please type only one letter in the "name" input or type an invalid e-mail address in the "e-mail" input and then move to the next input.  As you can see, the validation fires as it should.

NOW, please go to:

http://www.mattcashatt.com/test.htm

Please click on the mail icon and you will get a modal with the same mail form (contact.php) in an iframe.  

In FF and Chrome, the validation still fires as it should but not in IE.  In IE, it doesn't validate at all when in the modal/iframe.

I suspect that the problem lies in the little bit of javascript in contact.php that attaches an event listener to the window.  I'll bet that the IE DOM is different than the other browsers and hence not attaching the listener as it should but I can't seem to find the right approach.

I have posted a zip folder containing "test.htm", "contact.php", and all relevant CSS and JS files at this address:

http://www.mattcashatt.com/form_problem.zip

Many thanks in advance!

Matt

mattcashattAsked:
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.

superwmhCommented:
I'm using IE and the validation works fine with iframe/modal.
0
Bruce SmithSoftware Engineer IICommented:
Hey Matt, the test.htm page doesn't work correctly. The email button appears to load the home page in the pop-up, not the form. Check out the image attached - it's the screenshot of what I see.
Untitled.png
0

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
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
PHP

From novice to tech pro — start learning today.