How ActiveX Control Can send Event to my Asp Page

Results 1 to 3 of 3

Thread: How ActiveX Control Can send Event to my Asp Page

  1. #1
    Join Date
    Dec 1969

    Default How ActiveX Control Can send Event to my Asp Page

    if i have to send any data or information to activeX control <BR>i use javascript and public function of my activex control <BR>what about reverse i want my asp page listens to the events of my <BR>control

  2. #2
    Join Date
    Dec 1969

    Default ActiveX control in BROWSER???

    Then you can&#039;t do it. Any more than *any* code in the browser can invoke ASP code on the server.<BR><BR>Oh, you probably *could* figure out a way to use "Remote Scripting" by invoking same from JS code that in turn talks to the control. But that&#039;s just another way of doing a "round trip" from client to server, which is the *ONLY* way of transferring info from one to the other.<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default Declare Public Event in control and raise it

    You can do what you want by declaring the event in the control.<BR><BR>Something like this:<BR>Public Event SomethingHappened<BR><BR>Then in your control, when the something happens, do a raise event. I can&#039;t remember the exact syntax now - I&#039;d need to look at some of my controls at work.<BR><BR>Then in your JS client code, you&#039;d have the event coded. Don&#039;t know JS too much, but here&#039;s the way you&#039;d do it in VBScript:<BR><BR>Sub MyControl_SomethingHappened<BR> Msgbox "Something happened in my control!"<BR>End Sub<BR><BR>There is an ActiveX control development wizard (again, can recall the name, maybe the ActiveX Control Pad or something like that) that is GREAT for developing a "skeleton" of your control&#039;s code. I suggest getting that and using it. You&#039;ll learn a lot from that!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts