I am getting this error on my SharePoint site, which breaks many functionality, like the list AddNew form UI, which is coming out distorted in IE. The error is due to the fact that "attachEvent" is a deprecated function. This error is occurring in the init.js file, which is provided out-of-the-box by SharePoint.
Google Chrome and Mozilla Firefox are handling this error, but IE is unable to do that.
Add the JavaScript code snippet to the JS file used in the master page or used globally.
<script language="javascript">
if (typeof browseris !== 'undefined') {
browseris.ie = false;
}
</script>
🚀 "Happy Coding" 🚀
i tried using this code it is returning me with Syntax error.(line 3, file "Code")
ReplyDeleteCan you help me out what i did wrong? I just copied and paste.
Sorry for replying late.
DeletePlease check the version of IE browser it should be 11 or above.