|
Rank: Newbie Groups: Member
Joined: 4/4/2018 Posts: 3
|
I am trying your application. Soon maybe buy it. But while i am trying i have a problem. I have a code like this : Quote: Dim e As EO.WebBrowser.DOM.Element = xWebview.GetDOMWindow.document.getElementById("f:m8") AddHandler e.onclick, AddressOf Onclick1
But your program do not support onclick event, on DomElement. Is there any solution for this problem?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,258
|
Hi, There is no .NET side event on DOM.Element. You will need to handle the event in JavaScript code, then call into your .NET code from your JavaScript event handler. The code will be something like this:
Code: C#
webView.EvalScript(@"
document.getElementById('f:m8').onclick = function()
{
eoapi.extInvoke(...arguments to your .NET code...);
}
");
Here eoapi.extInvoke is the key. This is JavaScript function that allows you to call into your .NET code from JavaScript code. See here for more details on how to use this function: https://www.essentialobjects.com/doc/webbrowser/advanced/jsext.aspxHope this helps. Thanks
|
|
Rank: Newbie Groups: Member
Joined: 4/4/2018 Posts: 3
|
But i have a lot of VB codes at "Sub Onclick1". I can't change all of them.
I have found your code support that : "EO.WinForm.WebControl.Events.AddHandler"
How can i use that code above
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,258
|
You will need to change your code in order to use our product. Our product works differently than Microsoft's WebBrowser control.
|
|
Rank: Newbie Groups: Member
Joined: 4/4/2018 Posts: 3
|
Ok thank you
|
|