Your SAS programs, embedded in web apps and elsewhere

JQuery + SAS + IE 11 = Object doesn't support property or method 'addEventListener'

Reply
Super Contributor
Posts: 484

JQuery + SAS + IE 11 = Object doesn't support property or method 'addEventListener'

I’m using

A Jquery plugin from

http://wenzhixin.net.cn/p/multiple-select/docs/

to display multiple selectable dropdowns inside of a stored process displayed in a web url portlet.

Everything runs fine in Chrome and Firefox.

The plugin runs fine without using it nested in SAS. 

When I run it in the portlet in Internet Explorer 11 I receive:

Error: Object doesn't support property or method 'addEventListener'

This appears to be a compatibility issue.  Is there a known issue with Jquery + SAS + IE 11?

My SAS Platform is 9.2.

Contributor
Posts: 50

Re: JQuery + SAS + IE 11 = Object doesn't support property or method 'addEventListener'

Hello,

I think this error is specific to IE 11 and to solve it you need to use compatible mode.

To force IE compatibility mode on the user use this code in the master page:

<META http-equiv="X-UA-Compatible" content="IE=9">

A few foruns refer that we should use :

<meta http-equiv="X-UA-Compatible" content="IE=edge;" />

Best Regards

Super Contributor
Posts: 484

Re: JQuery + SAS + IE 11 = Object doesn't support property or method 'addEventListener'

What is the master page? If I am displaying a stored process inside of a web url portlet?  If I add either compatibility mode line SAS seems to strip it out.  When you view the source the compatibility line is not in the head section of the code.

Contributor
Posts: 50

Re: JQuery + SAS + IE 11 = Object doesn't support property or method 'addEventListener'

That's a good point that I didn't notice in the original message.

I think in the URL display portlet what you get is your content inside an iframe, and I think that IE does not allow mixing IE modes in a frame hierarchy.

How about setting the browser in compatibility mode just for check if it solves.

https://kb.wisc.edu/page.php?id=35591

Super Contributor
Posts: 484

Re: JQuery + SAS + IE 11 = Object doesn't support property or method 'addEventListener'

Since it is a stored process knowing what to add to the compatibility list is confusing

Contributor
Posts: 50

Re: JQuery + SAS + IE 11 = Object doesn't support property or method 'addEventListener'

Yes, you are right. And probably the only way is to add the SASPortal causing other problems.

And since adding this to you page didn't worked:

<html>
  
<head>
  
<meta http-equiv="X-UA-Compatible" content="IE=edge;" />
  
</head>
  
<body>
  ...
  
</body>
</html>

Probably the only way to fix it is digging in the plugin code to add the event listener according to the IE version.

Frequent Contributor
Posts: 91

Re: JQuery + SAS + IE 11 = Object doesn't support property or method 'addEventListener'

Hi David,

Does the stored process fail to render in the same way when you load it directly in IE11, or is it only when you display it inside a URL display portlet?

Super Contributor
Posts: 484

Re: JQuery + SAS + IE 11 = Object doesn't support property or method 'addEventListener'

Not sure how I could display it without showing it in the portlet.

Contributor
Posts: 50

Re: JQuery + SAS + IE 11 = Object doesn't support property or method 'addEventListener'

Display using the SAS Stored Process Web Application. (/SASStoredProcess)

It solves the STP withou any iframe I think.

Best Regards

Occasional Contributor
Posts: 18

Re: JQuery + SAS + IE 11 = Object doesn't support property or method 'addEventListener'

David,

 

     I am facing same issue with JQuery + SAS + IE 11 when tried to have multiple selectable dropdowns inside of a stored process displayed in a web url portlet with SAS 9.4. .

 

Even though I added below given code for my HTML generating Stored process I am still getting same error  Object doesn't support property or method 'addEventListener'

 

<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

 

Did you fix the issue with your application? If yes , could you please share the solution for this problem? 

Frequent Contributor
Posts: 91

Re: JQuery + SAS + IE 11 = Object doesn't support property or method 'addEventListener'

I don't think this has anything to do with SAS.

 

Could try a polyfill, but - what version of JQuery are you running?

Occasional Contributor
Posts: 18

Re: JQuery + SAS + IE 11 = Object doesn't support property or method 'addEventListener'

This issue seems to be related with below given note :

 

http://support.sas.com/kb/55290

As Portal is supporting IE 7 features only , I cannot use jquery based application in my portlets. I have to use direct link and per Tech Support reply there is no work around for it.  

Ask a Question
Discussion stats
  • 11 replies
  • 4458 views
  • 0 likes
  • 4 in conversation