Logo
My Account |  Site Map | Contact Us  
Welcome Guest Search | Active Topics | Sign In | Register

to know if the button inside the webview1 was clicked Options
megaloko21
Posted: Friday, July 30, 2021 3:40:02 PM
Rank: Newbie
Groups: Member

Joined: 7/27/2021
Posts: 1
good afternoon friends, i would like to know if the button was clicked inside the webview1

exemple

if WebView1.GetDOMWindow().document.getElementById("teste") Then
MessageBox.Show("clicked")
end if


help me
Jack Cheng
Posted: Tuesday, August 3, 2021 9:09:45 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 23,036
Hi,

I believe you have already asked this question in private message and we have already answered. Here is our original answer:

This is more complicated. You will need to do it with JavaScript. Then use WebView.JSInitCode to inject the script code into the page, or use WebView.EvalScript to run the code directly. In either case, the goal is to have your JavaScript code called when the button is clicked. Once you have your code called in JavaScript, you can then callback into your .NET code through JavaScript extension:

https://www.essentialobjects.com/doc/webbrowser/advanced/jsext.aspx

If you have any questions about this answer, please feel free to reply with your question. You should NOT just ignore our answers and choose to ask the same question again. You will not get a different answer.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.