I am getting the error
Critical Error: Object doesn't support this property or method addeventlistener
while accessing the InfoPath form page (using InfoPath enabled list form e.g. displayifs.aspx) in IE 11 browser.
This error is specific to IE 11, the page is opening properly in IE 10 and below. According to this MSDN post, IE 11 supports addEventListener.
Anybody have an idea on this?
This unfortunately breaks other things. Here is the fix I found on another site that seemed to work for me:
I'd say leave the X-UA-Compatible
as "IE=8"
and add the following code to the bottom of your master page:
<script language="javascript"> /* IE11 Fix for SP2010 */ if (typeof(UserAgentInfo) != 'undefined' && !window.addEventListener) { UserAgentInfo.strBrowser=1; } </script>
This fixes a bug in core.js
which incorrectly calculates that sets UserAgentInfo.strBrowse=3
for IE11 and thus supporting addEventListener
. I'm not entirely sure on the details other than that but the combination of keeping IE=8 and using this script is working for me. Fingers crossed until I find the next IE11/SharePoint "bug"!
Best way to solve this until a fix is available (if a fix comes) is to force IE compatibility mode on the user.
Use <META http-equiv="X-UA-Compatible" content="IE=9">
ideally in the masterpage so all pages in your site get the workaround.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With