How to use the webgadget callback code?

Linux specific forum
garretthylltun
Enthusiast
Enthusiast
Posts: 346
Joined: Wed Oct 26, 2005 2:46 am
Contact:

How to use the webgadget callback code?

Post by garretthylltun »

I found the code to use the navigational callback(http://www.purebasic.fr/english/viewtop ... t=callback) for the webgadget, but I'm not very versed in PB and am not sure how I can use this. Is this what I can use to let me know when a link is clicked? Get any page info using this? When the page loading is complete? The code is working, but I have no clue how to use it to obtain the information that I would like.

Can anyone please give me some tips on what I can do with this code?

Thanks in advance,
~Garrett
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
· Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
· http://www.freewarehome.com/ <-- Freeware listings since 1996
User avatar
Shardik
Addict
Addict
Posts: 2058
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

Re: How to use the webgadget callback code?

Post by Shardik »

garretthylltun wrote:Is this what I can use to let me know when a link is clicked?
Exactly! If the user clicks onto a hyperlink on a website, the WebGadgetCallback() will be called and the parameter *NavigationAction will contain a pointer to the clicked link. In your callback you may then decide whether to allow or reject the navigation to this link. The Linux and MacOS examples do exactly the same as example 2 (which currently only works in Windows) in PB's help for the WebGadget.
Post Reply