Form validation breaks in IE9 with Google maps present

zhumar 30 Sep, 2011
The topic basically says it all. We have several forms on a site and the only one where validation is having an issue is our contact form that has a Google map on top of it. When I load the form without the map, the validation notifications work well. Is there something I can do to fix this?

You can view the form here:
http://www.reflexion.net/contacts-us.html

*EDIT*
Just wanted to restate that IE is the only browser that won't validate here. Firefox and Chrome still work well.
GreyHead 30 Sep, 2011
Hi zhumar,

There seems to be some kind of problem with the MooTools library and IE9. A workaround is to force the browser into IE8 mode on the form page. That seems to do the trick. Please see this post

Bob
zhumar 03 Oct, 2011
I put the code into the form and it must be doing something because the compatibility view button disappears in my browser. However, the form is still not validating correctly. What is odd is that I tested it while in compatibility view before I put the code snippet in and the validation did work.

Is there anything else I can do with this?
GreyHead 05 Oct, 2011
Hi zhumar,

I just looked again and as far as I can see neither MooTools, nor any of the other ChronoForms scripts are being loaded. I'd guess that you've made some big changes to the template?

Bob
zhumar 05 Oct, 2011
I haven't done any changes myself, but some other people have. The template was not designed very well and many things would not load correctly on the site. Some changes had to be made for the template to behave correctly.

I don't know if it is just that page where the scripts aren't loading, but that is the only ChronoForm that is causing issues for us. We have about 10 or so other forms where validation works well. I just noticed that the only thing this page has that the other ones don't is Google Maps. That is why I figured there could some issue with Google Maps and ChronoForms scripts working together in IE.

For an example of another form, please see:
http://www.reflexion.net/support/contact-tech-support.html

Clicking submit on an empty form will tell you to enter your email address.
zhumar 05 Oct, 2011
I forgot to mention that, when I use the Frontend View feature on the contact us form, validation works well in IE. So, I load it on a page without Google Maps and it works. So there is definitely some script issues/conflicts at work here. My problem is how to get around that. :wink:
GreyHead 05 Oct, 2011
Hi zhumar,

Sorry, I was wrong - the scripts are being loaded but from a cached file (which is why I didn't see them before).

Right now - for me at least validation appears to be working in IE9.

Bob
GreyHead 06 Oct, 2011
Hi zhumar,

Interesting . . . it doesn't work for me when I first load it in IE, but if I refresh the page then it does work.

I wonder if there is a timing issue with the scritps loading here? What happens if you turn off the caching?

Bob
zhumar 06 Oct, 2011
I just tried turning it off, clearing the Joomla cache and then the IE cache again. I had the same results.

I feel like this shouldn't be a caching issue because all of the other forms are working for me in IE.

Also, the cache has been enabled again.
GreyHead 06 Oct, 2011
Hi zhumar,

I was actually think about the extension(?) you are using to cache the javascript files on the site. They are grouped together and loaded in a single cached file.

Bob
zhumar 06 Oct, 2011
Yep, that's what I was talking about too. We user JFinalizer to cram everything together to speed up the site. I disabled that plugin, cleared the Joomla cache and the IE cache, and still had no validation.
GreyHead 06 Oct, 2011
Hi zhumar,

:-( . . . I’ll keep thinking about this - it's an odd behaviour pattern.

Bob
zhumar 10 Oct, 2011
Ok, please let me know if you think of anything. I'll have one of our developers take a look at it as well to see if they can figure anything out.
zhumar 11 Oct, 2011
So our developer added code to force the form into IE7. I tried that with the code you provided to force it into IE8 and just changing it so it says EmulateIE7, but that didn't work for me. However, when our developer did it, it did work. Not sure why. Anyways, validation seems to be working now. Thanks for the help!

Just for reference, here is the code that was added into the code section of the form:
<?php
// Force IE9 and IE8 to run in IE7 emulation mode to avoid JS errors with Mootools 1.2.5
jimport('joomla.environment.browser');
$browser =& JBrowser::getInstance();
if ( $browser->getBrowser() == 'msie') {
  $doc =& JFactory::getDocument();
  $doc->setMetaData( 'X-UA-Compatible', 'IE=EmulateIE7', true );
}
?>
This topic is locked and no more replies can be posted.