Link to home
Start Free TrialLog in
Avatar of mattcashatt
mattcashattFlag for United States of America

asked on

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

Avatar of superwmh
superwmh

I'm using IE and the validation works fine with iframe/modal.
ASKER CERTIFIED SOLUTION
Avatar of Bruce Smith
Bruce Smith
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial