Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

An ActiveX hosting plugin for Firefox 3

187 views
Skip to first unread message

Leeor Aharon

unread,
Nov 20, 2008, 12:38:19 PM11/20/08
to dev-ext...@lists.mozilla.org
Hi list,

This is my first message to this list, forgive me if it's not the right
place for this.

I wanted to let the community know of a new plugin I wrote to allow
web-sites to make use of ActiveX controls in Firefox (only FF3 is supported
atm). The need for it arose here a couple of months ago, and after a long
time of trying to find existing solutions it was decided to write one
in-house.

I developed it here at IT Structures (www.itstructures.com), and parts of it
are based on code from the mozilla branch related to hosting ActiveX
controls. The plugin code is now hosted as a google code project and can be
found at http://code.google.com/p/ff-activex-host/. It is licensed under a
tri-license like the mozilla code: MPL/LGPL/GPL.

The plugin has some security related features to limit the risk it might
pose to users by making ActiveX controls available in Firefox. First of all,
it is using a special MIME Type so that it won't get triggered by sites that
were not specifically designed for it. Additionally, it supports lists of
well known CLSIDs and PROGIDs so that it can be limited to use with specific
controls and interfaces. Finally, it can be "site locked" to make sure it's
only being used by a predetermined list of domains.

Functionaly, it can be scripted via Javascript, and supports events as well.

Leeor.

nick...@hotmail.com

unread,
Dec 15, 2008, 11:26:21 AM12/15/08
to
Hi Leeor,

Is there any chance you might provide a wiki or some samples of using
this? I'd like to use JavaScript to script an ActiveX control I have,
but it doesn't seem to be working.

The steps I followed:

1. I downloaded your ActiveX hosting plugin and installed it into
Firefox 3
2. I installed my ActiveX control
3. I tried to get a DOM reference, with JavaScript, to the plugin
using an <object> tag with an id attribute, classid and codebase. e.g.
"var my plugin = document.getElementById("my_plugin");"
4. I tried to call the ActiveX control's methods using the DOM
reference I just got, e.g. "my_plugin.my_method();"
5. Firefox complains, the method is not a function

Any help would be great!

Nick

Leeor Aharon

unread,
Dec 21, 2008, 3:49:18 AM12/21/08
to

Hi Nick,

The project's home page on google code (http://code.google.com/p/ff-
activex-host/) has a sample object tag that shows how to use this
plugin. It is by design that regular object tags do not work with this
plugin. The purpose was to make sure this plugin does support ActiveX
in the wild, just web pages that were made for it.

This sample (taken from the google code project home) embeds the flash
control through this plugin, and shows how to pass parameters and bind
events:
<object
id="Control"
TYPE="application/x-itst-activex"
ALIGN="baseline" BORDER="0"
WIDTH="300" HEIGHT="300"
clsid="{D27CDB6E-AE6D-11cf-96B8-444553540000}"
progid="ShockwaveFlash.ShockwaveFlash"
event_OnReadyStateChange="OnReady"
param_src="http://www.youtube.com/v/53RdNYwImYc">
</object>

Did you use the correct MIME type to direct FF to use this plugin? You
can verify it by opening 'about:plugins' in FF, and see what MIME type
the plugin has registered. I suggest that you use the firebug
extension's javascript console to try and access the object:

var obj = document.getElementById("my_plugin"); // assuming the
object's id is 'my_plugin'
typeof(obj) // should show 'function'

Now you can try to invoke methods on the object. Also, if you have
firebug installed, the plugin will use the console for a bit of
logging.

Let me know if it's not resolved.
Leeor.

0 new messages