>Fox Gang,
>
>In a blog article where he discusses the Web Browser control (
http://www.west-wind.com/Weblog/posts/1849.aspx), Rick Strahl says, "There are a bunch of event hookups that deal with menu and key and click trapping."
>
>My question is, using the standard Web Browser control, how do you set up "event hookups" that will allow you to implement "click trapping?"
Using Javascript, of course. Any element has a bunch of on*() events; each one of them can call some script. That script, if you need to trap it somehow, can navigate to a special url (under your control, if you're creating the webpage), which you can trap in the oBrowser.navigate2() event, and then do whatever you want. You can set cancel=.t. (it's a parameter passed by ref), and the navigation actually won't happen, but you can mess with any element of the document or anywhere inside its DOM. It's powerful.