Examples of interaction between ActiveX controls and Javascript

  • 2020-03-30 03:11:25
  • OfStack

1. ActiveX passes parameters to Javascript
 
<script language="javascript" for="objectname" event="fun1(arg)"> 
fun2(arg); 
</script> 

Objectname is the name of ActiveX control by < Object> The id attribute in the tag is set as follows;
 
<object id="objectname" 
name="objectname" 
codebase="objectname.cab#version=1,0,0,0" 
classid="clsid:357A8DEC-0CFC-4D8D-9869-C2C356B844F7"> 
</object> 

Fun1 (arg) is the function of ActiveX control, here as an event, when the ActiveX control in fun1 run, Javascript event is triggered, fun2 is called, arg is the ActiveX control from the parameters.
To add...

Related articles: