How calling VB function from java script in gizmox webgui application ?

Closed
Ridha.soft - Oct 22, 2020 at 01:48 PM
Tombezlar Posts 2 Registration date Thursday May 20, 2021 Status Member Last seen May 26, 2021 - May 26, 2021 at 05:27 AM
Hi everyone,
In my Gizmox Webgui application (vb code) I have: "Form1" containing an "HtmlBox1" control In the form I have the following function:

"<PermissionSet(SecurityAction.Demand, Name:="FullTrust")> _
<System.Runtime.InteropServices.ComVisibleAttribute(True)> _
Public Sub VbHelloWorld()
MsgBox("Hello Ridha Ammar")
End Sub"

In order to call this function from "HtmlBox1.html" I added to the html code of the "HtmlBox1" control the following script:

"function showVbFunction (){
window.external.VbHelloWorld ();
}"

and the following link:

"<a href="#"> Say Hello World From VB </a>"

When debugging and clicking the link, I get the following error:
"window.external.VbHelloWorld is not a function"

The script cannot access the function.
Is there anyone who can help me?
Related:

1 response

Tombezlar Posts 2 Registration date Thursday May 20, 2021 Status Member Last seen May 26, 2021
May 26, 2021 at 05:27 AM
I just started learning java, so I can't give any specific advice. But the site where I learn java is an excellent blog, and perhaps you will find a solution to your problem there.
https://codegym.cc
Good luck with your task!
0