Help with assigning to event handlers on ActiveX objects

Hi

I'm looking for help on allowing Javascript code to assign an event
handler to a property on an ActiveX object.

More precisely... I'd like to be able to do this on my object:

-- begin javascript

function handleMyEvent() { // whatever }

var obj = new ActiveXObject("lib.object");
obj.MyEvent = handleMyEvent;

-- end javascript

As far as I can see, it requires adding a MyEvent property to the
object, and then creating and setting up the connection point from
within the procedure Set_MyEvent(Value: OleVariant);

My problem is the Delphi code inside the procudure - given the address
(or whatever javascript stores in Value), how do I bind that function
to the event so that it gets called when the event fires? How do I set
up the Connection Point, assuming that the event already exists as
part of the object's event interface?

Any help would be appreciated!

Thanks

Greg

-----------------------------------
Greg Kempe    http://www.kempe.net/
            g...@kempe.ANTISPAM.net