Welcome Guest Search | Active Topics | Sign In | Register

Where is "adhaddler" an event? Options
ismailakarim
Posted: Wednesday, April 18, 2018 5:33:23 AM
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?
eo_support
Posted: Wednesday, April 18, 2018 7:55:14 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
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.aspx

Hope this helps.

Thanks
ismailakarim
Posted: Wednesday, April 18, 2018 8:28:02 AM
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
eo_support
Posted: Wednesday, April 18, 2018 8:41:01 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
You will need to change your code in order to use our product. Our product works differently than Microsoft's WebBrowser control.
ismailakarim
Posted: Wednesday, April 18, 2018 9:07:43 AM
Rank: Newbie
Groups: Member

Joined: 4/4/2018
Posts: 3
Ok thank you


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.