Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trapping mouse Clicks in the standard Web Browser
Message
From
03/11/2009 22:57:51
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01433000
Message ID:
01433033
Views:
102
>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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform