[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

VB6 WEBBROWSER

Posted on 2014-04-25
14
Medium Priority
?
363 Views
Last Modified: 2014-06-10
I'm writing a program where I need to navigate to a web page and upload an xml file at the same time. The xml file is complete, and contains username and password along with other info required by the web page.
I am writing in VB6.
The company that handles the web page has a test page setup where I can paste my xml to a text box and then post to the web page, and that works great.
I just cannot get this to happen from within my code
0
Comment
Question by:jamesguy99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
14 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 40022712
without seeing your VB6 code, it will be difficult to comment on what could go wrong.
0
 

Author Comment

by:jamesguy99
ID: 40022947
'WB is my webbrowser
'strXMLFile contains the xml statement itself
'the web address is strWebPageEstimate - 'http://iseisi.staging.activant.com/Service/GenLogin.aspx

'I have tried
 WB.Navigate strWebPageEstimate, , , strXMLFile

i have also tried -
WB.Navigate strWebPageEstimate
WB.Document.Write.strXMLFile

Can someone tell me if I'm even close?
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 40023171
your call looks like it's basically correct, except that presumably the page requires some "headers"...
however, it's the page specs that you need to retrieve from them, which shall indicate what exactly you need to specify
http://support.microsoft.com/kb/172998
0
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.

 

Author Comment

by:jamesguy99
ID: 40026067
Gary - Your comments have been helpful, but I still am not there. I read the Microsoft article you noted above, but I'm still not getting a connection. Not certain what you mean by 'page specs', and who do I retrieve them from? This is a fairly large job for me, so I really need to work through this somehow. Thanks.
0
 

Author Comment

by:jamesguy99
ID: 40026070
Guy - one other thing - i have no problem giving you my xml code (which I know is correct and complete). If that could help somehow, just let me know. Thanks again.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 40027030
the XML alone won't help, as I would have to "guess" what "header" are to be send.
0
 

Author Comment

by:jamesguy99
ID: 40027139
Guy, should the people who developed the web page be able to tell me what 'headers' I am needing?
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 40027222
Yes, absolutely
0
 

Author Comment

by:jamesguy99
ID: 40049900
Anyone who may be interested - this code runs -

    Dim strXMLFile As String
    Dim flags As Long
    Dim TargetFrame As String
    Dim PostData() As Byte
    Dim strData As String
    Dim Headers As String
    Call CreateXMLFile(strXMLFile)
    PostData = strXMLFile
    flags = 0
    TargetFrame = ""
    Headers = "Content-Type: application/x-www-form-urlencoded" & vbCrLf
    WebBrowser.Navigate strWebPageEstimate, flags, TargetFrame, PostData, Headers
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 40049912
so indeed it was some headers to put :)
glad you got the last bit for your application code to work
0
 

Author Comment

by:jamesguy99
ID: 40050438
Guy - thanks again for your insight.
It let me know where to direct my search.
As you might expect, I am now needing some sample code to download some html code from that same web site.
Once again I am using the ActiveX Webbrowser in VB6.
I have Googled some but have not found exactly what I am looking for.
Any ideas?
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 40061464
you use the .Navigate (or .Navigate2) method to open the URL, and catch the document on the NavigateComplete2 event of the browser control
0
 
LVL 49

Expert Comment

by:Martin Liss
ID: 40124060
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question