Looking for somebody who is really good at JS and VB6
€8-50 EUR
Pagato alla consegna
Hello!
I am using the following VB6 browser:
[login to view URL](Edge-Chromium)/page8
I have posted a question there, and this is the reply that I got and why I am now looking for somebody who can do it:
I'd ask the developer who has programmed the C# interaction (with CEF),
to write a similar js-function for you...
WebView2 is using chromium as well, but as said, the DOM-interfaces are not exposed to the VB/COM-side here.
Therefore you have to use "preloaded js-functions" to interact with the Browser-DOM "on the inside" of WV2 -
and communicate with the outside via JSON-strings.
Such a C#->js-v8 porting should not be that hard for the developer, who originally wrote the C#-stuff.
All I can do here from my end, is to show you the "principle".
Code:
Option Explicit
Private WithEvents WV As cWebView2, Elements As cCollection
Private Sub Form_Load()
Visible = True
Set WV = [login to view URL](hWnd)
With [login to view URL] 'js-helpers
.AddNL "function getElements(sExpr){"
.AddNL " var resArr = []"
.AddNL " for (var e of [login to view URL](sExpr).values()){"
.AddNL " [login to view URL]({tag:[login to view URL], id:[login to view URL], val:[login to view URL], name:[login to view URL], href:[login to view URL]})"
.AddNL " }"
.AddNL " return [login to view URL](resArr)"
.AddNL "}"
.AddNL "function setElementBackgroundById(id, color){"
.AddNL " [login to view URL]('#'+id).[login to view URL] = color"
.AddNL "}"
[login to view URL] .ToString
End With
With [login to view URL] 'two anchors and two buttons as test-HTML-content
.AddNL "<a id='a1' href='#foo'>LinkFoo</a><br>"
.AddNL "<input id='b1' type='button' value='button 1'><br>"
.AddNL "<a id='a2' href='#bar'>LinkBar</a><br>"
.AddNL "<input id='b2' type='button' value='button 2'><br>"
[login to view URL] .ToString
End With
'retrieve a few elements "by selector-expression"
Set Elements = [login to view URL]([login to view URL]("getElements", "a, input"))
Dim Elmt As cCollection 'the enumerated Elements themselves are (again) of type cCollection - but hold a JSON-Object instead of a JSON-array
For Each Elmt In Elements 'iteration over the gathered Element-Objects in the JSON-Array: Elements
[login to view URL] [login to view URL] 'just to show, which properties are contained "per element"
Select Case UCase$(Elmt("tag")) 'first Property-access on an Element (here the "tag"-Property)
Case "A": [login to view URL] "setElementBackgroundById", Elmt("id"), "#f00"
Case "INPUT": [login to view URL] "setElementBackgroundById", Elmt("id"), "#0f0"
End Select
Next
End Sub
... but the adaption of the above shown principle (to your concrete problem), really is your part.
Rif. progetto: #36312407
Info sul progetto
11 freelance hanno fatto un'offerta media di €45 per questo lavoro
Hello. I read your requirement and also check attachment link i will do that. Please come on chat we will discuss more about this. I will waiting your reply.
Hello, My name is Yasir and I have read the details I believe I can do this job. While I believe I have some queries which need to be clarified. For that I would request you to start the chat so we could clarify those Altro
Hello. I read your request and will also verify the attachment link. Please join the conversation so we can talk more about this. I'm waiting for your response.
Hi, I am professional in JavaScript , C++ and C#. Before working on it I have few questions on my mind. Kindly contact me ASAP so I can start working on this project. Best Regards Syed
CERTIFIED ENGINEER, EXPERT IN ENGINEERING&SCIENCE, Dear Client, I have Keenly gone through your project requirements as given in your project description. I gladly inform you that i am in possession of all clearly sta Altro