
Getting events to work with ActiveX control in IE
You're right - OnChange works. Strange, I am sure I tried that one too -
must have got something else wrong.
Thanks everyone.
-J
"Alex K. Angelopoulos" <alex_angelopoulos_at_hotmail_dot_com_remove__> wrote
A couple of things...
(1) That CLSID belongs to FM20.DLL. Its progid is Forms.ComboBox, so you
will find references to it as either of those.
(2) I think the problem here is that you need to somehow bind an OnChange to
the data, and I am totally useless on figuring out how to do that. Here's a
modified form of the HTML page you had which demonstrates that "standard"
events from the object are correctly handled by IE..
<html>
<SCRIPT FOR=Combo1 EVENT=onblur language=VBScript>
msgbox "Hello!"
</script>
<body>
<OBJECT ID=Combo1
CLASSID="CLSID:8BD21D30-EC42-11CE-9E0D-00AA006002F3"
LANGUAGE="VBScript" height=24 onChange="vbscript:hi">
<PARAM NAME="BackStyle" VALUE="1">
<PARAM NAME="BackColor" VALUE="16777215">
<PARAM NAME="BorderStyle" VALUE="1">
<PARAM NAME="BorderColor" VALUE="0">
<PARAM NAME="DisplayStyle" VALUE="3">
<PARAM NAME="ForeColor" VALUE="0">
<PARAM NAME="FontHeight" VALUE="10">
<PARAM NAME="Font" VALUE="MS Sans Serif">
<PARAM NAME="ShowDropButtonWhen" VALUE="2">
<PARAM NAME="FontName" VALUE="MS Sans Serif">
<PARAM NAME="Size" VALUE="7072;400">
<PARAM NAME="SpecialEffect" VALUE="2">
<PARAM NAME="ListRows" VALUE="8">
<PARAM NAME="BoundColumn" VALUE="1">
<PARAM NAME="VariousPropertyBits" VALUE="746604571">
</OBJECT>
</body>
<html>
: Hi,
:
: I am trying to put a combo box on an HTML page, with the following object
: tag:
:
: <html><body>
: <OBJECT ID="Combo1"
: NAME="Combo1"
: CLASSID="CLSID:8BD21D30-EC42-11CE-9E0D-00AA006002F3"
: LANGUAGE="VBS">
: <PARAM NAME="BackStyle" VALUE="1">
: <PARAM NAME="BackColor" VALUE="16777215">
: <PARAM NAME="BorderStyle" VALUE="1">
: <PARAM NAME="BorderColor" VALUE="0">
: <PARAM NAME="DisplayStyle" VALUE="3">
: <PARAM NAME="ForeColor" VALUE="0">
: <PARAM NAME="FontHeight" VALUE="160">
: <PARAM NAME="Font" VALUE="MS Sans Serif">
: <PARAM NAME="ShowDropButtonWhen" VALUE="2">
: <PARAM NAME="FontName" VALUE="MS Sans Serif">
: <PARAM NAME="Size" VALUE="7072;400">
: <PARAM NAME="SpecialEffect" VALUE="2">
: <PARAM NAME="ListRows" VALUE="8">
: <PARAM NAME="BoundColumn" VALUE="1">
: <PARAM NAME="VariousPropertyBits" VALUE="746604571">
: </OBJECT>
: ...Etc.
:
: I can't get it to generate any events in VB Script. I have tried adding
this
: to the object tag:
:
: afterupdate="TestSub()"
:
: ...and adding a script block with a sub called "TestSub", and also tried
: this sort of thing:
:
: <script language=VBS>
: Sub Combo1_AfterUpdate()
: msgbox "Hello!"
: End Sub
: </script>
:
: ...but my script is never called. What is going on? Should this work?
:
: Also: Can anyone tell me where I can find help on using this ActiveX
: control? I can't seem to find much about it (ie what the parameters do,
what
: events it supports, etc). (I got the HTML by exporting an MS Access form
to
: an ASP file).
:
: Any help appreciated - thanks.
: Jere
:
:
: