Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Catching an hyperlink click using the web browser contro
Message
De
13/07/2004 08:56:56
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00923611
Message ID:
00923651
Vues:
13
Hey Franco, it works great, gracie tanti!

Regards,

Fernando

>Yes, in past I've done exactly what you need.
>You have to use the BeforeNavigate2 event of the web browser control.
>The second parameter of that event: "url" is the hyperlink clicked.
>What I've done in past is to display html that contains "strange" hyperlink like "myapp:39" or "myapp:xx" where "myapp:" is text that I decode in BeforeNavigate2 to take the appropriate action in the application, but not to open the hyperlink clicked. The number after the "myapp:" string, infact, was the record number to seek to and display in other application form.
>It was perfect way to querying the database from an html page stored locally.
>For example, in the BeforeNavigate2 put this code:
>
>
>LPARAMETERS pdisp, url, flags, targetframename, postdata, headers, cancel
>
>local lpos,lnrid
>lpos=at("MYAPP:",upper(url))
>lnrid=val(substr(url,lpos+9))
>if lpos>0
>   cancel=.t.  && this is important!!!!
>   goapp.runform("anotherappform")
>   _vfp.activeform.displayPkey(lnrid)
>endif
>
>
>to execute your code, but not navigate to the hyperlink clicked
>HTH
>
>Franco
>
>>Hi,
>>
>>I have an application that creates a form with the web browser control in it. I create html text and show it inside the control. Everything is working fine.
>>
>>There is a means (some event or else) to catch when the app user clicks over an hyperlink created in the html text, so I can take appropriate action, instead of the browser making the normal navigation action?
>>
>>Thanks,
>>
>>Fernando
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform