Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to send data from VB6 to an HTML page

Status
Not open for further replies.

espositophp

Programmer
Sep 30, 2003
31
0
0
Hello, I would like to know if it is possible to send data from a VB5 app to a textbox contained in an HTML page.

Of course, I do possess the source files of both the VB5 app and the Web pages.

So, to make things extremely clear, I have a VB5 form containing a textbox (txtName) and a command button. (cmdSendValue)

When I click on the button, I would like to open a Web page and automatically fill in a text field (ID = txtName) with the data contained in my VB5 textbox.

I don't want to trigger any other events on the Web page. All I need to do is pass the content of my VB5 textbox to the text field on the Web page, so that the user won't have to type the same information twice.

Any help will be appreciated.
 
you could just have the webpage load in your program then you have all the members of the web object exposed in your application and you can then insert anything into any field from your app.
 
The problem is, I have to use my VB5 application in a local area network, so I can't run a setup procedure to register OCX's.

Is there any way you can interact with a Web page without resorting to third-party custom controls?

TIA
 
Splice the HTML. I expect somewhere in the HTML you should have Text="" or whatever. Just replace that with a placeholder variable IE %1 or whatever. Then read in the HTML file as text and scroll through it using instr() to search for it and filter it out using left right or mid statements. I do it all the time and it's very simple once you get it down. If you need help just post back and I'll type ya up some sample code.
 
Or have the page generated by ASP or PHP, then pass the name into the query string...
 
Dear MattNeeley, I'd love to have some sample code that could allow me to interact with an HTML page from VB.

So, to sum up, my VB5 form contains a textbox (txtName) and a command button. (cmdSendValue) When I click on the button, I would like to open a Web page and automatically fill in a text field (ID = txtName) with the data contained in my VB5 textbox.

The HTML file is called form.htm and is located in the same folder as the VB5 exe. Obviously, when my application is complete, the HTML page should be posted onto a server, but I think this does not change anything except the file path (URL)

TIA
 
Dear mmilan, could you provide me with a practical example of what you have said?

Please note I sometimes use ASP.NET, even if the application I am working on right now is being developed in VB5.

So the main problem I would llike to solve is how to pass a value from a textbox in VB5 to a textbox (more commonly called textfield) in an HTML page.

TIA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top