QUOTE(PureHeart @ May 10 2007, 07:53 AM)

I'm writing a web application for language learning and I'd like to use the Speech API from Microsoft for speech recognition. Therefore, I need to embed an ActiveX control to the web page (html file). The questions are:
1. How to embed this ActiveX control to the web page, I don't know the class id of that control. For a RealPlayer, I would use
CODE
<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="32" height="32"></object>
and in this case, i need the value for
classid.
2. In case the user (client) doesn't have that activeX control, how to have it downloaded automatically (with permission)?
3. How to handle the events of the control.
Link:
http://www.microsoft.com/speech/default.mspxDownload:
http://www.microsoft.com/downloads/details...;displaylang=enPS: I'm new to JS. Please answer with code.
If i remember correctly the class id for the control depends on the object itself, for example if you develop that control with VB its class id is generated by VB when you compile and create it by using the Application Setup Wizard.
In case the user doesn't have that ActiveX control installed, it can be downloaded automatically and installed in his machine by using a cab file, the location from where it can be downloaded is specified by a CODEBASE parameter of the object tag, this cab file must be created by you and stored in your webserver, as you guess, the value of the codebase is an URL relative to the location of your html page.
To handle the events of the control you can do it as usual for example if your object is a button to handle the click event of it you can use something like this:
CODE
<html>
<head>
<title>Title</title>
</head>
<body>
<p>some text</p>
<object classid="clsid:9999-99D5-00AA00AA00" id="BtnHello">
</object>
<script language="VBScript">
Sub BtnHello_OnClick()
MsgBox "BtnHello was clicked"
End Sub
</script>
</body>
</html>
Please, forgive me if i'm wrong because i dont use visual basic for a long long time, so take this as a brief help.
Best regards,
Comment/Reply (w/o sign-up)