call / run / execute a javascript function on a html webpage with an vb 6 activeX on the same page

I've made a small vb6 activex control which resides on a webpage.
The webpage also got a Javascript.
What code in the VB6 activex component is needed to call / execute the
HelloWorld Javascript below?

Sample code:
<HTML>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!--
function hello()
{
alert ("Hello world");
}
//-->
</SCRIPT>
</head>

<BODY>
<OBJECT id="myvbcomp" name="test1" classid="clsid:758D9CAB-04FE-49BF-AD81-886234C88189"> </OBJECT>

<A HREF="JavaScript:hello()">Hellolink on webpage</A>

</BODY>
</HTML>

/ Thanks
Lionheart2010Asked:
Who is Participating?
 
Maheshwar RSoftware DeveloperCommented:
put a button and assign an onclick event.. or Try the following code..


<HTML>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!--
function hello()
{
alert ("Hello world");
}
//-->
</SCRIPT>
</head>

<BODY>
<OBJECT id="myvbcomp" name="test1" classid="clsid:758D9CAB-04FE-49BF-AD81-886234C88189"> </OBJECT>

<A HREF="JavaScript:hello()">Hellolink on webpage</A>
<input id="Button1" type="button" value="button" onclick="return hello()" />
</BODY>
</HTML>

surely it works..
0
 
Lionheart2010Author Commented:
Your suggestion only adds a button to the webpage.
My question is how I call / run / execute / start / activate the Javascript function FROM the Visual Basic Component on the same page ( the <Object> )
I can put a button on the VB6 component, but it must be Visual Basic code to, not HTML.

Any more ideas?

/ Richard
0
 
Lionheart2010Author Commented:
0
 
Lionheart2010Author Commented:
Niversoft's suggestion on my other question solved this issue as well. THANKS!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.