Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 507
  • 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">
</form>

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

Thanks!
0
Lionheart2010
Asked:
Lionheart2010
  • 3
  • 2
1 Solution
 
NiversoftCommented:
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;
</script>

Open in new window

0
 
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?
0
 
NiversoftCommented:
Correct.
0
 
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
http://www.experts-exchange.com/Web_Development/Components/ActiveX/Q_25014096.html
Thanks a lot !
 / Richard
0
 
Lionheart2010Author Commented:
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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