Solved

VB6 WEBBROWSER

Posted on 2014-04-25
14
347 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
  • 6
  • 6
14 Comments
 
LVL 142

Expert Comment

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

Author Comment

by:jamesguy99
Comment Utility
'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 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
Comment Utility
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
 

Author Comment

by:jamesguy99
Comment Utility
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
Comment Utility
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 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
the XML alone won't help, as I would have to "guess" what "header" are to be send.
0
Want to promote your upcoming event?

Attending an event? Speaking at a conference? Or exhibiting at a tradeshow? Easily inform your contacts by using a promotional banner in your email signature. This will ensure your organization’s most important contacts are in the know.

 

Author Comment

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

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
Yes, absolutely
0
 

Author Comment

by:jamesguy99
Comment Utility
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 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
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
Comment Utility
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 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
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 45

Expert Comment

by:Martin Liss
Comment Utility
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

Integrate social media with email signatures

Is your company active on social media? Do you also use email signatures? Including social media icons in your email signature is a great way to get fans for free. Let all your email users know you’re on social media quickly and easily, in a single click.

Join & Write a Comment

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.
Explore the encryption capabilities built into Google Apps and how these features can help you meet privacy policy and regulatory compliance, but are not a full solution. Understand and compare the most popular email encryption services for Google A…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In this Experts Exchange video Micro Tutorial, I'm going to show how small business owners who use Google Apps can save money by setting up what is called a catch-all email address in their Gmail accounts. By using the catch-all feature, small busin…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now