Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pause code until operation is completed
Message
From
03/02/2002 08:54:12
 
 
To
31/01/2002 23:29:27
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00613179
Message ID:
00614532
Views:
14
Thanks Erik - I'll try that.

I was using the webview to get quotes down for a stock portfolio program I developed which required that I go to the Yahoo site and manually download the data and then import into a vfp table. That what the subsequent processing was all about.

I noticed in an article in the January Foxpro advisor that Rich Stahl used the XMLHTTP component that part of the Microsoft XML parser to download stock data from yahoo. After playing around with that component I was able to get the data down without opening the yahoo quotes page. It works very well and is extremely fast.

I have several ideas for using _webview and know the issue will come up again so thanks again.


Gaylen




>>I use the following code to get data from the internet.
>>
>> x = NEWOBJECT("_webform", HOME()+"\gallery\_webview")
>> x.olewebbrowser.navigate2("http://quote.yahoo.com")
>> x.show()
>>
>> *** subsequent code follows which uses the data that is downloaded.
>>
>>The problem is that the subsequent code runs before I get the data downloaded.
>>
>>I can put the web access in one command button and the subsequent code under another command button and have it two step process. However, I would prefer to have the user click only one command button.
>>
>>Any thoughts would be appreciated
>>
>>Thanks
>>Gaylen Jungling
>
>You can check the WebBrowser control's readystate property, and wait until it = 4, and then check the WB.Document.ReadyState property and wait till it equals "complete". This will take a 2 step polling process:
>
>DO WHILE x.olewebbrowser.readystate <> 4
>ENDDO
>
>DO WHILE x.olewebbrowser.document.readystate <> "complete"
>ENDDO
>
>Of course, you'll want to put an escape hatch in those loops in the case where the page is unavailable.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform