Results 1 to 6 of 6

Thread: webbrowser postdat and after in vb6

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2011
    Posts
    3

    webbrowser postdat and after in vb6

    Hello World.

    building an application that posts cXML invoices and awaits success or fail cXML data.

    To post invoice:

    WebBrowser1.Navigate URL, Flags, TargetFrame, PostData, Headers

    Where PostData is a cXML invoice document.

    Navigate works great, a few seconds later the web browser refreshes with the following:

    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE cXML (View Source for full doctype...)>
    - <cXML xml:lang="en-US" timestamp="2011-05-13T18:52:49+00:00" version="1.2.020">
    - <Response>
    <Status text="OK" code="200">Successful TEST</Status>
    </Response>
    </cXML>


    My question is: How do I access this xml reply from the server, in particular, the <Status text=........... line?

    Thanks,

    John C

  2. #2
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: webbrowser postdat and after in vb6

    Try

    Dim ReturnData As String

    ReturnData = WebBrowser1.Document.body.innerHTML


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2011
    Posts
    3

    Re: webbrowser postdat and after in vb6

    Quote Originally Posted by jmsrickland View Post
    Try

    Dim ReturnData As String

    ReturnData = WebBrowser1.Document.body.innerHTML
    Thanks, that got me close.

    text1.text = WebBrowser1.Document.documentElement.outertext got me what I was looking for.

  4. #4
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: webbrowser postdat and after in vb6

    Quote Originally Posted by JohnCollett View Post
    Thanks, that got me close.

    text1.text = WebBrowser1.Document.documentElement.outertext got me what I was looking for.
    I was just guessing.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  5. #5

    Thread Starter
    New Member
    Join Date
    May 2011
    Posts
    3

    Re: webbrowser postdat and after in vb6

    I appreciated the guess!

    I've been frustrated finding any doc on the properties available to webbrowser.document.

  6. #6
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: webbrowser postdat and after in vb6

    Quote Originally Posted by JohnCollett View Post
    I appreciated the guess!

    I've been frustrated finding any doc on the properties available to webbrowser.document.
    There is a very good thread of examples of using the WebBrowser in the Code Bank

    http://www.vbforums.com/showthread.php?t=384076
    Last edited by jmsrickland; May 17th, 2011 at 01:09 PM.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width