WebGadget : BeforeNavigate and more...

Just starting out? Need help? Post your questions and find answers here.
nememoris
New User
New User
Posts: 4
Joined: Wed Nov 18, 2020 4:51 pm

WebGadget : BeforeNavigate and more...

Post by nememoris »

Hello.
I try to convert my delphi code to purebasic.
In delohi, the TWebbrowser component (like Webgaget) have a function beforenavigate() who is called when you leave a web page to a new and befor the new strat to download.
Is this function exists in purebasic, i can't find it ?
Is there a function to munipulate the dom (extract input value) ?

If you have a simple link to a tutorial will, it's ok for me because i can't find.

I m french and the most part of time i transalte using google so the results are not the bests...

regards
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: WebGadget : BeforeNavigate and more...

Post by JHPJHP »

Hi nememoris,

To directly interface the onbeforenavigate event requires an understanding of PureBasic Interfaces.

There are programmers on the forum that can help you, but first put some time into solving the problem yourself.
If/when you get stuck, make sure to post code that can be executed and demonstrates the issue.

Windows Services & Other Stuff\Other_Stuff\GadgetStuff\WebGadget\IWebBrowser2.pb
- press the News menu option; NavigationCallback reacts like the onbeforenavigate event
- close the window to see a simple use if the IWebBrowser2 interface (debugger enabled)
- includes a couple extra interface identifiers (DataSection)
Last edited by JHPJHP on Tue Nov 24, 2020 7:08 pm, edited 1 time in total.
nememoris
New User
New User
Posts: 4
Joined: Wed Nov 18, 2020 4:51 pm

Re: WebGadget : BeforeNavigate and more...

Post by nememoris »

Thank you
I'm sorry, I thought there was no need for sample code.
I proceeded as in Delphi.
I selected the gadget and looked for the procedures associated with it, but they are not as numerous as under delphi.
PB applications are much lighter but I can't find everything there and I have trouble searching sometimes.
I saw that it was necessary to combine javascript to retrieve the contents of input fields but this is totally beyond me ...
I think I will have to continue this project in Delphi because it is much simpler, I would do another in PB
Post Reply