 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Robert Shanbaum Guest
|
Posted: Thu Nov 13, 2003 11:18 pm Post subject: Hooking events in IE |
|
|
I have written an application which may or may not be an automation server -
that is, it can run standalone, or can be invoked via a COM interface. In
the latter mode, there are a few events that I want to fire to provide
notifications back to the controller. I see how to do this in a Delphi
program, but - how can I do this in IE? I have no problem getting IE to
invoke the program, and call methods on the automation interface, but I
can't see how to do the event sinking stuff that I do in a Delphi app in
either VBScript or JScript (mind you, I'm an ignoramus when it comes to
script). Anyone have any examples of doing this sort of thing?
|
|
| Back to top |
|
 |
Robert Shanbaum Guest
|
Posted: Thu Nov 13, 2003 11:35 pm Post subject: Re: Hooking events in IE |
|
|
I take some of that back - in IE, the "standard DHTML" methods show up, so I
can't call the methods in the automation object's interface. Here's how I'm
invoking it:
<OBJECT id="APXObj"
codeBase="http://localhost/Test3/APTracerX.cab#Version=2,3,0,16"
classid="clsid:566C7286-859A-4D7F-9081-921AD8566C23"
VIEWASTEXT>
<SPAN STYLE="color:red">Object failed to load! </SPAN>
</OBJECT>
That causes the exe to run, but that's about it...
|
|
| Back to top |
|
 |
Robert Shanbaum Guest
|
Posted: Fri Nov 14, 2003 4:50 pm Post subject: Re: Hooking events in IE - more |
|
|
Well, I figured out that SOMETHING has to have a reference to the automation
object as such, so I added some buttons to the HTML page, and event handlers
like:
Sub Button1_onclick
dim XObj
Set XObj = CreateObject("APTracerX.APTracer")
XObj.show
End Sub
Sub Button2_onclick
dim XObj
Set XObj = CreateObject("APTracerX.APTracer")
XObj.hide
End Sub
where "show" and "hide" are methods in the interface that simply call the
eponymous methods on the app's main form. That works. Now, I have to
figure out how to sink the events in script. I think I posted earlier that
I can do that OK in a controller app, but it sure would be nice to see an
example of how to do that in script in IE.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|