Determining if ActiveX Controls are Disabled

Discussion in 'Javascript' started by DartmanX, Oct 12, 2005.

  1. DartmanX

    DartmanX Guest

    Is there a simple way to determine if someone using Internet Explorer
    has completely disabled ActiveX controls?

    Jason
     
    DartmanX, Oct 12, 2005
    #1
    1. Advertising

  2. DartmanX

    Guest

    DartmanX wrote:
    > Is there a simple way to determine if someone using Internet Explorer
    > has completely disabled ActiveX controls?
    >
    > Jason


    Perhaps someone else knows of a simple way to detect if ActiveX is
    disabled. It is true that IE browsers and close relatives such as MSN9,
    MyIE2, and Avant can handle general ActiveX, if not disabled. However
    several other browsers can use plugins to handle a very limited subset
    of ActiveX(there are some hacks for general ActiveX on many browsers
    which I would not use). For example recent Netscape browsers came with
    ActiveX support for the WMP only. Also there are plugins that can be
    downloaded for the same type of ActiveX support of the WMP for Mozilla
    and Firefox. This should be kept in mind in any test designed to detect
    full or partial ActiveX support.

    Media pages often use ActiveX. In this case the standard way seems to
    be to write a dual path for browsers that do and do not support ActiveX
    rather than detecting ActiveX support. For example one can write an
    ActiveX object for the WMP that allows many control parameters. One can
    also include a second ordinary object(or embed if one does not care
    about standards)that usually allows fewer controls. If the browsers
    does not support ActiveX, the second path is automatically taken. That
    is just the way an ActiveX object is designed to work. I have often
    seen such an approach used for Real media and flash as well as for
    Microsoft wmv and wma formats. ActiveX objects are very easy to spot.
    They have a 32 digit hex ID that is unique for each device or program
    to be controlled.
     
    , Oct 13, 2005
    #2
    1. Advertising

  3. DartmanX

    DartmanX Guest

    Well, the reason I ask the question is because what I am doing needs to
    be able to determine if ActiveX is completely disabled on IE in order
    to display a "Sorry, this function won't work" message.

    Jason
     
    DartmanX, Oct 13, 2005
    #3
  4. DartmanX wrote:
    > Is there a simple way to determine if someone using Internet
    > Explorer has completely disabled ActiveX controls?


    Ask them?

    Richard.
     
    Richard Cornford, Oct 13, 2005
    #4
  5. DartmanX

    Guest

    DartmanX wrote:
    > Well, the reason I ask the question is because what I am doing needs to
    > be able to determine if ActiveX is completely disabled on IE in order
    > to display a "Sorry, this function won't work" message.
    >
    > Jason


    I do not think that javascript is a good answer. Even if you can come
    up with a script that can detect ActiveX support or not with 100%
    accuracy, there is a problem. Many people who turn off ActiveX also
    turn off javascript. For all such people, a script method is doomed to
    failure. Thus, if the detection you wish is reasonable at all, it
    likely needs to be done on the server using php script, Perl, or
    something of the sort.
     
    , Oct 13, 2005
    #5
  6. DartmanX

    Randy Webb Guest

    said the following on 10/12/2005 10:56 PM:

    > DartmanX wrote:
    >
    >>Well, the reason I ask the question is because what I am doing needs to
    >>be able to determine if ActiveX is completely disabled on IE in order
    >>to display a "Sorry, this function won't work" message.
    >>
    >>Jason

    >
    >
    > I do not think that javascript is a good answer. Even if you can come
    > up with a script that can detect ActiveX support or not with 100%
    > accuracy, there is a problem. Many people who turn off ActiveX also
    > turn off javascript.


    I have JS enabled, ActiveX disabled. I understand how my browser works,
    how ActiveX works, and what kind of security holes I am opening/closing
    by having it set that way.

    > For all such people, a script method is doomed to failure.


    That is not true. JS/ActiveX is the best answer to answer a JS/ActiveX
    question. You put the warning in the page and then have JS/ActiveX
    remove it.

    "Warning: I have no idea how to implement my page without JS and ActiveX
    so if you see this then I failed in my objective of producing an
    accessible webpage to all."

    Then, you write an ActiveX object that would change that text. Pretty
    simple stuff.

    If the warning stays, then JS is disabled and the user is notified. If
    JS/ActiveX is available, it removes the warning and JS/ActiveX enabled
    users get the enhancement.

    > Thus, if the detection you wish is reasonable at all, it
    > likely needs to be done on the server using php script, Perl, or
    > something of the sort.


    Huh? And how would the server attempt to determine that? It can't
    possible determine it better than JS could attempt to determine it.

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
     
    Randy Webb, Oct 13, 2005
    #6
  7. DartmanX

    Guest

    Randy Webb wrote:
    > said the following on 10/12/2005 10:56 PM:
    >
    > > DartmanX wrote:
    > >
    > >>Well, the reason I ask the question is because what I am doing needs to
    > >>be able to determine if ActiveX is completely disabled on IE in order
    > >>to display a "Sorry, this function won't work" message.
    > >>
    > >>Jason

    > >
    > >
    > > I do not think that javascript is a good answer. Even if you can come
    > > up with a script that can detect ActiveX support or not with 100%
    > > accuracy, there is a problem. Many people who turn off ActiveX also
    > > turn off javascript.

    >
    > I have JS enabled, ActiveX disabled. I understand how my browser works,
    > how ActiveX works, and what kind of security holes I am opening/closing
    > by having it set that way.



    >
    > > For all such people, a script method is doomed to failure.

    >
    > That is not true. JS/ActiveX is the best answer to answer a JS/ActiveX
    > question. You put the warning in the page and then have JS/ActiveX
    > remove it.
    >
    > "Warning: I have no idea how to implement my page without JS and ActiveX
    > so if you see this then I failed in my objective of producing an
    > accessible webpage to all."
    >
    > Then, you write an ActiveX object that would change that text. Pretty
    > simple stuff.
    >
    > If the warning stays, then JS is disabled and the user is notified. If
    > JS/ActiveX is available, it removes the warning and JS/ActiveX enabled
    > users get the enhancement.
    >
    > > Thus, if the detection you wish is reasonable at all, it
    > > likely needs to be done on the server using php script, Perl, or
    > > something of the sort.

    >
    > Huh? And how would the server attempt to determine that? It can't
    > possible determine it better than JS could attempt to determine it.
    >
    > --
    > Randy
    > comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly


    You do not need to use script at all in many cases - you just take
    advantage of the AX object. As I mentioned in my first post, if you
    use an AX object and AX is not supported, a second path will be taken
    if it is included in the AX object. This second path can be a simple
    paragraph that states anything you wish. See
    http://www.cwdjr.info/souearly/AXtest.php . This includes an AX object
    for the WMP with no other player path if AX is not installed or turned
    off. Instead the second path is just a paragraph. Of course you must
    have a WMP installed to view how the player works. If I view the page
    on IE6 with ActiveX on, the player works. It also works on my Firefox
    browser for which I have downloaded the AX plugin for the WMP only. The
    player does not appear on my Mozilla, because I have not installed an
    AX plugin for the WMP on it. Instead you get the warning that AX is not
    installed or turned off. The same happens for the old Netscape 4.8 and
    Amaya, which has no AX or javascript installed. The most recent Opera
    is a special case. It plays the page as if it had AX installed. I
    believe that Opera is using some trick to play media written with AX
    support only, even though I doubt if Opera supports AX directly. I wish
    someone from Opera would tell us exactly what is going on.
     
    , Oct 13, 2005
    #7
  8. DartmanX

    Randy Webb Guest

    said the following on 10/13/2005 12:30 AM:

    <snip>
    >
    >
    > You do not need to use script at all in many cases - you just take
    > advantage of the AX object.


    Huh? The post I quoted you say this:

    <quote>
    Thus, if the detection you wish is reasonable at all, it
    likely needs to be done on the server using php script, Perl, or
    something of the sort.
    </quote>

    And now you say to use AX to detect AX? (which is exactly what I said).

    > As I mentioned in my first post, if you use an AX object and AX is
    > not supported, a second path will be taken if it is included in the AX
    > object. This second path can be a simple paragraph that states anything
    > you wish.


    Which is the same effect as I described.

    AX itself determines whether it is available or not - not the server.

    The server is very rarely (if ever) the best place to try to determine
    if a client side technology is available or not.

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
     
    Randy Webb, Oct 13, 2005
    #8
  9. DartmanX

    Guest

    Randy Webb wrote:
    > said the following on 10/13/2005 12:30 AM:
    >
    > <snip>
    > >
    > >
    > > You do not need to use script at all in many cases - you just take
    > > advantage of the AX object.

    >
    > Huh? The post I quoted you say this:
    >
    > <quote>
    > Thus, if the detection you wish is reasonable at all, it
    > likely needs to be done on the server using php script, Perl, or
    > something of the sort.
    > </quote>
    >
    > And now you say to use AX to detect AX? (which is exactly what I said).
    >
    > > As I mentioned in my first post, if you use an AX object and AX is
    > > not supported, a second path will be taken if it is included in the AX
    > > object. This second path can be a simple paragraph that states anything
    > > you wish.

    >
    > Which is the same effect as I described.
    >
    > AX itself determines whether it is available or not - not the server.
    >
    > The server is very rarely (if ever) the best place to try to determine
    > if a client side technology is available or not.
    >
    > --
    > Randy
    > comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly


    Perhaps you did not see my first post or it has not appeared on your
    newsreader yet, so I will quote the part about a second path that I
    mentioned there.

    "Media pages often use ActiveX. In this case the standard way seems to
    be to write a dual path for browsers that do and do not support ActiveX
    rather than detecting ActiveX support. For example one can write an
    ActiveX object for the WMP that allows many control parameters. One can
    also include a second ordinary object(or embed if one does not care
    about standards)that usually allows fewer controls. If the browsers
    does not support ActiveX, the second path is automatically taken. That
    is just the way an ActiveX object is designed to work."

    I just detailed this and gave a working example for a paragraph as a
    second path on the post you quoted. Of course if you view many pages
    with AX objects, you will find all sorts of html used as a second path
    if AX is not installed or turned off, so this is nothing new at all.

    In case anyone wonders, the php include in the example page has nothing
    to do with the AX object. It just writes and serves the page as proper
    xhtml 1.1 served as application/xhtml+hml for browsers that will accept
    this mime type. For outmoded browsers, such as the IE6, that will not
    accept this mime type, the page is rewritten as html 4.01 strict, and a
    comment is added to the source code telling what was done. You can see
    this by viewing on the IE6 and checking the source code.

    For the record, there are, or were, very complicated scripts for
    detecting if a WMP, for example, is installed, what version it is, and
    if there is AX support for it. This is/was somewhere on the vast
    Microsoft sites. The best I remember, it used 2 javascripts(or perhap
    Microsoft Jscripts?) and 1 vb script. Because of the vb script, this
    method would not work on many other non-Microsoft browsers.
     
    , Oct 13, 2005
    #9
  10. DartmanX

    The Magpie Guest

    Richard Cornford wrote:
    > DartmanX wrote:
    >
    >>Is there a simple way to determine if someone using Internet
    >>Explorer has completely disabled ActiveX controls?

    >
    > Ask them?
    >

    Even if it is enabled, Javascript is a silly way to try and find out.
    What if Javascript is disabled?
     
    The Magpie, Oct 14, 2005
    #10
  11. DartmanX

    DartmanX Guest

    It's a given with this particular application (not the world at large,
    but this application) that it won't run with javascript disabled. The
    users are aware of this fact.
     
    DartmanX, Oct 14, 2005
    #11
  12. DartmanX

    Randy Webb Guest

    The Magpie said the following on 10/14/2005 10:54 AM:

    > Richard Cornford wrote:
    >
    >> DartmanX wrote:
    >>
    >>> Is there a simple way to determine if someone using Internet
    >>> Explorer has completely disabled ActiveX controls?

    >>
    >>
    >> Ask them?
    >>

    > Even if it is enabled, Javascript is a silly way to try and find out.
    > What if Javascript is disabled?


    Who said anything, in that reply, about Javascript?

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
     
    Randy Webb, Oct 14, 2005
    #12
  13. DartmanX

    Randy Webb Guest

    DartmanX said the following on 10/14/2005 6:25 PM:

    > It's a given with this particular application (not the world at large,
    > but this application) that it won't run with javascript disabled. The
    > users are aware of this fact.


    Then make your users aware of the fact that it requires ActiveX as well.
    Then you have no problem trying to determine if it is disabled or not.

    Please quote what you are replying to.

    If you want to post a followup via groups.google.com, don't use the
    "Reply" link at the bottom of the article. Click on "show options" at
    the top of the article, then click on the "Reply" at the bottom of the
    article headers.

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
    Answer:It destroys the order of the conversation
    Question: Why?
    Answer: Top-Posting.
    Question: Whats the most annoying thing on Usenet?
     
    Randy Webb, Oct 15, 2005
    #13
  14. DartmanX

    The Magpie Guest

    Randy Webb wrote:
    > The Magpie said the following on 10/14/2005 10:54 AM:
    >
    >> Richard Cornford wrote:
    >>
    >>> DartmanX wrote:
    >>>
    >>>> Is there a simple way to determine if someone using Internet
    >>>> Explorer has completely disabled ActiveX controls?

    >>
    >>> Ask them?
    >>>

    >> Even if it is enabled, Javascript is a silly way to try and find out.
    >> What if Javascript is disabled?

    >
    > Who said anything, in that reply, about Javascript?
    >

    Given this is a Javascript newsgroup, that should be taken as read.
     
    The Magpie, Oct 15, 2005
    #14
  15. DartmanX

    Randy Webb Guest

    The Magpie said the following on 10/15/2005 8:52 AM:
    > Randy Webb wrote:
    >
    >> The Magpie said the following on 10/14/2005 10:54 AM:
    >>
    >>> Richard Cornford wrote:
    >>>
    >>>> DartmanX wrote:
    >>>>
    >>>>> Is there a simple way to determine if someone using Internet
    >>>>> Explorer has completely disabled ActiveX controls?
    >>>
    >>>
    >>>> Ask them?
    >>>>
    >>> Even if it is enabled, Javascript is a silly way to try and find out.
    >>> What if Javascript is disabled?

    >>
    >>
    >> Who said anything, in that reply, about Javascript?
    >>

    > Given this is a Javascript newsgroup, that should be taken as read.


    So everything you read in this newsgroup you assume is a Javascript
    question? Thats a flawed line of reasoning.

    The answer to my question is: Nobody.

    But, JS is the *only* mechanism that can *reliably* determine if it is
    /enabled/. Nothing can determine, reliably, if it is /disabled/.

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
     
    Randy Webb, Oct 15, 2005
    #15
  16. The Magpie wrote:
    > Randy Webb wrote:
    >> The Magpie said the following on 10/14/2005 10:54 AM:
    >>> Richard Cornford wrote:
    >>>> DartmanX wrote:
    >>>>> Is there a simple way to determine if someone using
    >>>>> Internet Explorer has completely disabled ActiveX controls?
    >>>
    >>>> Ask them?
    >>>>
    >>> Even if it is enabled, Javascript is a silly way to try
    >>> and find out. What if Javascript is disabled?

    >>
    >> Who said anything, in that reply, about Javascript?
    >>

    > Given this is a Javascript newsgroup, that should be taken
    > as read.


    Oh no it shouldn't. Understanding a technology is as much about knowing
    when it should or should not be used as knowing how it can be used and
    where it could and could not be used. The best possible advice a
    javascript group can give to many questions about the possibility of
    using javascript for some tasks is that it is an inappropriate
    technology for the task and so should not be used. In such circumstances
    anyone presenting a javascript hack that might be effective in 80% of
    circumstances is manifestly doing the questioner a disservice, and
    giving _bad_ advice, and certainly whenever an alternative technology
    could give 100% reliability.

    There is certainly no inherent dependency on javascript in asking the
    user a question:-

    <form action="someServerScritp" method="POST">
    <div>
    Have you completely disabled ActiveX controls in this browser?
    <input type="submit" value="Yes" name="Response">
    <input type="submit" value="No" name="Response">
    </div>
    </form>

    If you combine 'all answers must be exclusively javascript approaches'
    and "what if javascript is disabled?", then all answers must become "No
    you cannot do this" (because all exclusively javascript approaches must
    fail utterly whenever javascript is not executed). In practice
    javascript should be designed to be integrated with the technologies
    that represent the rest of the system, and informed design decisions are
    capable of identifying the best approach to be taken, which may not
    involve javascript at all, or may involve javascript in a non-critical
    way.

    Richard.
     
    Richard Cornford, Oct 16, 2005
    #16
  17. DartmanX

    Guest

    wrote:

    > For the record, there are, or were, very complicated scripts for
    > detecting if a WMP, for example, is installed, what version it is, and
    > if there is AX support for it. This is/was somewhere on the vast
    > Microsoft sites. The best I remember, it used 2 javascripts(or perhap
    > Microsoft Jscripts?) and 1 vb script. Because of the vb script, this
    > method would not work on many other non-Microsoft browsers.


    I did find a script that at one time was available at Netscape. The
    link I had is gone, and I do not know if they deleted the script or
    moved it. However I find that I made a copy of the script without the
    discussion and still have it. It detects if the WMP is installed, if
    ActiveX is supported, etc. I could have made a minor change in the
    code, but the script is mainly that of Netscape. It likely is rather
    out of date now, and I believe I remember that some of the tests may
    now fail on some recent browsers. Thus I do not think you should use it
    without testing on many browsers and bringing the code up to date. I
    have found that I usually can get around testing for AX by providing an
    alternative path in the AX object as described in previous posts. Thus
    I had all but forgotten about this script. Since this is not my script,
    the complaint department is at Netscape :).

    See the source code at http://www.cwdjr.net/wmp/NN_IE_WMP_Sniff.html .
     
    , Oct 16, 2005
    #17
  18. JRS: In article <dikcen$qsq$1$>, dated Thu, 13
    Oct 2005 02:15:02, seen in news:comp.lang.javascript, Richard Cornford
    <> posted :
    >DartmanX wrote:
    >> Is there a simple way to determine if someone using Internet
    >> Explorer has completely disabled ActiveX controls?

    >
    >Ask them?


    They may not know who to ask.

    The word "has", in that context, can refer either to a past action of
    the IE user (which they may or may not remember) or just to a present
    state of the IE (whoever caused it).

    The following can discriminate between working and not working
    *javascript*; it should not be placed in script.htm or noscript.htm :

    <META HTTP-EQUIV="REFRESH" CONTENT="1; URL=noscript.htm">

    <script>
    window.location.href="script.htm"
    </script>
    Javascript is not working

    You may or may not be able to do something similar in ActiveX.

    --
    © John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
    <URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
    <URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
    <URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
     
    Dr John Stockton, Oct 16, 2005
    #18
  19. DartmanX

    The Magpie Guest

    Richard Cornford wrote:
    > The Magpie wrote:
    >
    >>Randy Webb wrote:
    >>
    >>>The Magpie said the following on 10/14/2005 10:54 AM:
    >>>
    >>>>Richard Cornford wrote:
    >>>>
    >>>>>DartmanX wrote:
    >>>>>
    >>>>>>Is there a simple way to determine if someone using
    >>>>>>Internet Explorer has completely disabled ActiveX controls?
    >>>>
    >>>>>Ask them?
    >>>>>
    >>>>Even if it is enabled, Javascript is a silly way to try
    >>>>and find out. What if Javascript is disabled?
    >>>
    >>>Who said anything, in that reply, about Javascript?
    >>>

    >>Given this is a Javascript newsgroup, that should be taken
    >>as read.

    >
    > Oh no it shouldn't.


    I disagree, but that is almost totally irrelevant.

    > [snip]The best possible advice a
    > javascript group can give to many questions about the possibility of
    > using javascript for some tasks is that it is an inappropriate
    > technology for the task and so should not be used.
    >


    Which is what I actually did.
     
    The Magpie, Oct 17, 2005
    #19
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David
    Replies:
    2
    Views:
    351
    Natty Gur
    Jul 31, 2003
  2. Stu Carter
    Replies:
    6
    Views:
    8,339
    Punisher
    Aug 14, 2003
  3. =?Utf-8?B?RHVuZQ==?=

    validator controls and disabled controls

    =?Utf-8?B?RHVuZQ==?=, Feb 4, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    704
    Peter Blum
    Feb 4, 2004
  4. Replies:
    0
    Views:
    898
  5. vml
    Replies:
    0
    Views:
    1,058
Loading...

Share This Page