Calling JavaScript from ActiveX object 
Author Message
 Calling JavaScript from ActiveX object

Hello,

I have some ActiveX objects that are embedded in some HTML pages. I would
like to call some JavaScript on the HTML pages from inside the ActiveX
objects.
There is a (quite obscure) way of doing this from an applet.
Can anyone tell me how this can be done from an ActiveX object. (I prefer
C/C++ sample code but VB code is welcome as well)

TIA

Silvio Bierman



Sun, 29 Aug 2004 19:05:47 GMT  
 Calling JavaScript from ActiveX object
Create public events within the ActiveX control and handle the events in
script.

Paul.


Quote:
> Hello,

> I have some ActiveX objects that are embedded in some HTML pages. I would
> like to call some JavaScript on the HTML pages from inside the ActiveX
> objects.
> There is a (quite obscure) way of doing this from an applet.
> Can anyone tell me how this can be done from an ActiveX object. (I prefer
> C/C++ sample code but VB code is welcome as well)

> TIA

> Silvio Bierman



Sun, 29 Aug 2004 22:42:14 GMT  
 Calling JavaScript from ActiveX object
Hi Paul:
Can you give me a example?
I can't handle events that ActiveX object fires
This is My code

usercontrol.ctl
================================================
Public Event onabc()
Public Sub abc()
    RaiseEvent onabc
End Sub
================================================

test.html
================================================
<script language="javascript">
function fnInit()
{
    abc.abc();

Quote:
}

document.onreadystatechange = fnInit;

function abc::onabc()
{
        alert("abc");

Quote:
}

</script>

<HTML><BODY><OBJECT classid="clsid:0D36026B-D40C-4030-8036-
20E0D040B0D0" id="abc">
</OBJECT></BODY></HTML>
================================================

but nothing happend
how to handle a Activex control's event?

thank you

Quote:
>-----Original Message-----
>Create public events within the ActiveX control and

handle the events in
Quote:
>script.

>Paul.



>> Hello,

>> I have some ActiveX objects that are embedded in some
HTML pages. I would
>> like to call some JavaScript on the HTML pages from
inside the ActiveX
>> objects.
>> There is a (quite obscure) way of doing this from an
applet.
>> Can anyone tell me how this can be done from an ActiveX
object. (I prefer
>> C/C++ sample code but VB code is welcome as well)

>> TIA

>> Silvio Bierman

>.



Sun, 05 Sep 2004 16:30:50 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Calling ActiveX methods in JavaScript&IE5

2. Call to activex works in JavaScript, VB, not in VBScript

3. vbscript or javascript called from activeX control ??

4. catastrophic error from javascript when calling activeX

5. vbscript or javascript called from activeX control ??

6. Javascript and VB ActiveX Objects...

7. Passing Objects Between ActiveX and JavaScript

8. activeX calling activeX in 2000

9. help ActiveX Error : ActiveX component can't create object

10. ActiveX Error : ActiveX component can't create object

11. VBScript calling to a COM object that expects a user-defined object

12. calling a function in the opening script of an InternetExplorer.Application object from the object

 

 
Powered by phpBB® Forum Software