• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 524
  • Last Modified:

activex - Modify a textbox.value in a form on a webpage which also has the activex vb6

I've made a small activex control which shows up on a webpage.
The html webpage also includes a Form with a textbox.
What code do I need in the active-x control to modify the textbox value on the
html-page, where the component resides?

Sample code from the HTML:

<OBJECT id="myvbcomp" name="test1" classid="clsid:758D9CAB-04FE-49BF-AD81-886234C88189"></OBJECT>
<form method="POST" name="mittform">
  <input type="text" name="mintext" size="20" value="textruta">

What code in the VB6 activex alters the value "textruta" on the html textbox?

  • 3
  • 2
1 Solution
I would probably try to raise an event in the activeX control, and handle that event in vbscript or javascript. The event handler can then easily modify the textbox value.

Something like:

<script for="myvbcomp" event="UpdateForm(value)">
   document.getElementByName("mintext")[0].value = value;

Open in new window

Lionheart2010Author Commented:
If I understand you correct, your script above (which should be put in the html of the webpage) "listen" if the ocx raises an event, and then capture the parameter from the Visual Basic 6 ActiveX ?
The script then alters the textbox on the webpage with the value from the ocx.
Is this correct?
Lionheart2010Author Commented:
Yep, now I've learned how to raise events in VB, and it works.
It also solved my "activate javascript function" from VB OCX question
Thanks a lot !
 / Richard
Lionheart2010Author Commented:
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.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now