How can I force IE9 to run in IE8 mode?

There are some compatibility issues between the later versions of MooTools and the implementation of JavaScript in IE9. These usually result in a failure of form validation with no error messages in the JavaScript console. If you change the IE9 Browser mode to IE8 using the Web Developer Tools (click F12) these frequently disappear.

 

If this is happening with your form please try this code in a Custom Code action in the On Load event:

<?php
// Force IE9 to run in IE8 emulation mode to avoid JS errors with Mootools 1.2 or later
jimport('joomla.environment.browser');
$browser =& JBrowser::getInstance();
if ( $browser->getBrowser() == 'msie' && $browser->getMajor() == 9 ) {
  $doc =& JFactory::getDocument();
  $doc->setMetaData( 'X-UA-Compatible', 'IE=EmulateIE8', true );
}
?>
 

You may also like:

Comments:

You need to login to be able to post a comment.