Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trapping mouse Clicks in the standard Web Browser
Message
De
03/11/2009 22:57:51
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01433000
Message ID:
01433033
Vues:
101
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform