Click here to Skip to main content
15,879,047 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,
In my Gizmox Webgui application (vb code) I have: "Form1" containing an "HtmlBox1" control
In the form I have the following function:
VB
<permissionset (securityaction.demand,="" name:="FullTrust" )=""> _
<system.runtime.interopservices.comvisibleattribute (true)=""> _
Public Sub VbHelloWorld ()
MsgBox ("Hello World")
End Sub

In order to call this function from "HtmlBox1.html" I added to the html code of the "HtmlBox1" control the following script:
JavaScript
function showVbFunction () {
window.external.VbHelloWorld ();
}
and the following link:
HTML
<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?

What I have tried:

what i tried is already mentioned in the above paragraph
Posted
Updated 27-Oct-20 6:51am
v4
Comments
OriginalGriff 22-Oct-20 6:55am    
OK, to use the code widget, highlight the code fragment and hover your mouse over the word "code" on the tool bar. Select the appropriate language (VB, HTML, or Javascript in your case) and that will engage the highlighter and retain any formatting.

I#'ve edited your question and modified the "question" part to contain this, and left the "What I have tried" section as you left it - see the difference?

BTW: You shouldn't just repeat the same text in both sections - "WHat I have tried" is there for you to explain what you have done to find out why it happens, so we don't repeat things you have tried already...
Ridha.soft 22-Oct-20 13:42pm    
thank you verry mutch
I will try
Ridha.soft 23-Oct-20 13:31pm    
Is there a expert who can answer me?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900