Results 1 to 4 of 4

Thread: Webbrowser ReadyState

Threaded View

  1. #1

    Thread Starter
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Resolved Webbrowser ReadyState

    I enter a stock code I want the price for in a hidden webbrowser control and then simulate clicking the submit button using the below code. The problem is the page hasn't finished loading by the time I get the source code of the page.

    I thought the loop I've got would have worked but it doesn't?? Are there any other ways to "do nothing" until a page has finished displaying all text/images etc...??

    VB Code:
    1. WB1.Document.All("SecurityCode").Value = QuoteInfo(1, i) 'share code
    2. WB1.Document.getElementById("btnAction").Click 'submit form
    3.  
    4. 'while page is loading do nothing
    5. Do While WB1.ReadyState <> READYSTATE_COMPLETE
    6. DoEvents
    7. Loop
    8.  
    9. 'Get html source
    10. SourceCode = WB1.Document.documentElement.OuterHTML
    Last edited by lintz; Dec 17th, 2005 at 06:53 AM.

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