You are here: Reference > JavaScript > client-side > ActiveX > GeckoActiveXObject

GeckoActiveXObject object

Browser support:
Creates an instance of an ActiveX object in Gecko based browsers.
The GeckoActiveXObject object is similar to the Internet Explorer specific ActiveXObject object.
Since ActiveX is a Microsoft technology that is only available on Windows, Gecko based browsers do not support it by default. You can add ActiveX support to Firefox with the Mozilla ActiveX Plug-in, but it is not available for Firefox 2 and above.
If you want to embed an external application into your HTML page, use the cross-browser object element instead.


Methods that return the object:
new GeckoActiveXObject (progIDOrclassID)
The progIDOrclassID parameter is a string that specifies the programmatic identifier or the class identifier of the ActiveX object. The class identifier must be placed in curly braces '{}'.

Inherits from:

Example HTML code 1:

This example illustrates the use of the GeckoActiveXObject object:
    <script type="text/javascript">
        var player = null;
        if (window.ActiveXObject) {
            player = new ActiveXObject ("WMPlayer.OCX.7");
        else {
            if (window.GeckoActiveXObject) {
                try {
                    player= new GeckoActiveXObject ("WMPlayer.OCX.7");
                catch (e) {
                    alert (e);

        if (player) {
            alert ("The version of your Windows Media Player is " + player.versionInfo);
        else {
            alert ("Cannot create a Windows Media Player instance!");
Did you find this example helpful? yes no

External links:

User Contributed Comments

Post Content

Post Content