locked
IE 11 ActiveX "TypeError: object doesn't support property or method" RRS feed

  • Question

  • We develop an activex control and use it in a webpage. In IE11 (version 11.0.9600.16428), when a method of activex is called in javascript, we get the following error.

    "TypeError: object doesn't support property or method"

    Properties work fine.

    Example:

    var ax = document.getElementById('idActivex');

    ax.itemCount = 10; // Works

    ax.SetValue(5, 10); // In IE11 "TypeError: object doesn't support property or method"

    It works in all other IE versions. I think it is related with IE 11. Can anyone help with this issue?

    Saturday, November 9, 2013 9:49 AM

Answers

  • Hello everyone,

    I solved the issue.

    At the server side code, for internet explorer the browser type is checked as the following:

    if (System.Web.HttpContext.Current.Request.Browser.Browser == "IE")

    For Internet Explorer 11 it happens to be:

    System.Web.HttpContext.Current.Request.Browser.Browser == "InternetExplorer"

    When it is not "IE", instead of the following:

    <object id="idactivex" classid="CLSID:some-guid-here"></object>

    The server side code sends the following code for Chrome and Firefox.

    <object id="idactivex" type="application/x-activex-name"></object>

    IE 11 does not understand it and interprets the variable as a standart javascript object. Property assignments seem to be working but when it is a function, it throws exception.

    Saturday, November 9, 2013 9:43 PM

All replies

  • Hello everyone,

    I solved the issue.

    At the server side code, for internet explorer the browser type is checked as the following:

    if (System.Web.HttpContext.Current.Request.Browser.Browser == "IE")

    For Internet Explorer 11 it happens to be:

    System.Web.HttpContext.Current.Request.Browser.Browser == "InternetExplorer"

    When it is not "IE", instead of the following:

    <object id="idactivex" classid="CLSID:some-guid-here"></object>

    The server side code sends the following code for Chrome and Firefox.

    <object id="idactivex" type="application/x-activex-name"></object>

    IE 11 does not understand it and interprets the variable as a standart javascript object. Property assignments seem to be working but when it is a function, it throws exception.

    Saturday, November 9, 2013 9:43 PM
  • Hi Albert,

    Thanks for your sharing. I think it may be very helpful for other community,

    Thanks,

    Regards,

    Will


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, November 19, 2013 7:28 AM
  • hello, I have the same question.

    can you explain how you solve this bug more clearly :-)

    I use <object id="idactivex" classid="CLSID:some-guid-here"></objectin my .jsp file.

    did you mean replace this with <object id="idactivex" type="application/x-activex-name"></object> ?

    Saturday, October 25, 2014 3:57 AM