You have to create the JS functions in the WebBrowser by creating the
text in a string (S in my case) and then assigning the string to
webBrowser.documentText
in the string you define the JS functions like
S += " function jsGetVersion() {"
' Return the version of geplugin
S += " return(ge.getEarthVersion() + ' GeAPIVersion: ' +
ge.getApiVersion() );"
S += " }" & vbCrLf
then:
WebBrowser1.DocumentText = S
and you can then call the function with
webObj(0) = WebBrowser1.Document.InvokeScript
("jsGetVersion", webObj)
You're not re-loading the web page, but executing JS functionms within
the web page.
If you're new to .NET then there's a pretty steep learning curve
ahead. But it's worth it