Getting events to work with ActiveX control in IE 
Author Message
 Getting events to work with ActiveX control in IE

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



Fri, 10 Sep 2004 12:31:24 GMT  
 Getting events to work with ActiveX control in IE
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
:
:
:



Fri, 10 Sep 2004 12:59:19 GMT  
 Getting events to work with ActiveX control in IE
hi Jere,

I don't think you are going to have any luck with the afterUpdate event, as
it pertains to the forms 2.0 combo box.  There is no such event for the
combo (at least on ofc2k).  The closest event I see (for the combo) is the
change event.

There IS an afterUpdate event, but it applies to the forms 2.0 control
collection.  That leads one to suspect that the combo would have to be
instantiated on a Forms 2.0 FORM (so as to have a controls collection
present), rather than being instantiated in IE.  But how you would work that
into an html script using a forms 2.0 control (i.e., your combo box) is
beyond me.  Maybe a more knowledgable person can come along and answer that.

There have been many postings in the past, from people having trouble with
using forms 2.0 controls in IE.

cheers, jw


Quote:
> 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



Sat, 11 Sep 2004 01:55:53 GMT  
 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
:
:
:



Sat, 11 Sep 2004 03:33:17 GMT  
 Getting events to work with ActiveX control in IE
You probably had 22 other items reconfigured at the same - time that's what I do when something I believe *should* work doesn't... :)
Quote:

> 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
> :
> :
> :



Sat, 11 Sep 2004 03:44:36 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Active X controls not working in IE 5.5 but works in IE 6.0

2. Getting events from the IE control in the parent application

3. Does ActiveX Controls work with non-IE Browsers?

4. ActiveX control events and IE

5. not getting events in IE4 from ActiveX Control written in VB5

6. not getting events in IE4 from ActiveX Control written in VB5

7. ActiveX Events in JScript Not Working (VBScript Works Fine)

8. JScript event handler for ActiveX DLL events within IE

9. Whether IE control Work with out IE?

10. ActiveX control event not working when in asp.net page

11. Whether IE Control work with out IE?

12. IE not getting events from local domain

 

 
Powered by phpBB® Forum Software