473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

How to confirm a Web Page Download is Complete?

I know there has been a lot of questions and answers on this topic, But
I still don't have a clear understanding of how this works in VB6. So
here is what I did to really make sure that the webpage has been
downloaded completely before my program proceeds to click the order
entry confirmation button. But from time to time, when there are many
order entry transations, the dreadful run time error message "Object or
structure not found" shows up and crash my program.

'first checking
'==========
Web3Ready = False
strWaiting = "Web3"
Do While Not Web3Ready '
DoEvents
Loop

'second checking
'=============
Do While Form1.WebBrowser3.Busy
DoEvents
Loop
'third checking
'==========
If IsObject(Form1.WebBrowser3.Document.All.Item("Orde rEntry1:_ctl13"))
Then
Form1.WebBrowser3.Document.All.Item("OrderEntry1:_ ctl13").Click
End If

Dec 15 '06 #1
2 1929
Sean,

Is this for Net 2.0 using the webbrowser from that or is it the
Axwebbrowser, for the last you can use the downloadcomplete2 event.

For the first has Herfried written a nice solution in this newsgroup,
\\\
Private Sub WebBrowser1_DocumentCompleted( _
ByVal sender As Object, _
ByVal e As WebBrowserDocumentCompletedEventArgs _
) Handles WebBrowser1.DocumentCompleted
If Me.WebBrowser1.ReadyState = WebBrowserReadyState.Complete Then
MsgBox("Document and frames loaded!")
End If
End Sub
///

I hope this helps,

Cor
"Sean" <ye****@gmail.comschreef in bericht
news:11**********************@16g2000cwy.googlegro ups.com...
>I know there has been a lot of questions and answers on this topic, But
I still don't have a clear understanding of how this works in VB6. So
here is what I did to really make sure that the webpage has been
downloaded completely before my program proceeds to click the order
entry confirmation button. But from time to time, when there are many
order entry transations, the dreadful run time error message "Object or
structure not found" shows up and crash my program.

'first checking
'==========
Web3Ready = False
strWaiting = "Web3"
Do While Not Web3Ready '
DoEvents
Loop

'second checking
'=============
Do While Form1.WebBrowser3.Busy
DoEvents
Loop
'third checking
'==========
If IsObject(Form1.WebBrowser3.Document.All.Item("Orde rEntry1:_ctl13"))
Then
Form1.WebBrowser3.Document.All.Item("OrderEntry1:_ ctl13").Click
End If

Dec 16 '06 #2
Hi Cor,

Thanks for the posting and your kind advice.

My environment is neither Net2.0 nor Axwebbrowser, but simple VB6.0 in
Microsoft visual studio 6.0. I am not sure whether I can still use your
quoted solution, but will try in my environment.

Thanks again.

Sean

Cor Ligthert [MVP] wrote:
Sean,

Is this for Net 2.0 using the webbrowser from that or is it the
Axwebbrowser, for the last you can use the downloadcomplete2 event.

For the first has Herfried written a nice solution in this newsgroup,
\\\
Private Sub WebBrowser1_DocumentCompleted( _
ByVal sender As Object, _
ByVal e As WebBrowserDocumentCompletedEventArgs _
) Handles WebBrowser1.DocumentCompleted
If Me.WebBrowser1.ReadyState = WebBrowserReadyState.Complete Then
MsgBox("Document and frames loaded!")
End If
End Sub
///

I hope this helps,

Cor
"Sean" <ye****@gmail.comschreef in bericht
news:11**********************@16g2000cwy.googlegro ups.com...
I know there has been a lot of questions and answers on this topic, But
I still don't have a clear understanding of how this works in VB6. So
here is what I did to really make sure that the webpage has been
downloaded completely before my program proceeds to click the order
entry confirmation button. But from time to time, when there are many
order entry transations, the dreadful run time error message "Object or
structure not found" shows up and crash my program.

'first checking
'==========
Web3Ready = False
strWaiting = "Web3"
Do While Not Web3Ready '
DoEvents
Loop

'second checking
'=============
Do While Form1.WebBrowser3.Busy
DoEvents
Loop
'third checking
'==========
If IsObject(Form1.WebBrowser3.Document.All.Item("Orde rEntry1:_ctl13"))
Then
Form1.WebBrowser3.Document.All.Item("OrderEntry1:_ ctl13").Click
End If
Dec 17 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: JohnSouth104 | last post by:
Hi I want to warn the user that changing the selected item in a pull-down will clear some data he has already entered in a file download box. I've tried using confirm() to return true or false...
2
by: Kathy Burke | last post by:
I'm trying to use the following code to use a javascript return confirm. Cancel would exit the sub and return the page to its history (-2). OK would proceed with the asp.net code, i.e., run the...
3
by: Wm. Scott Miller | last post by:
Hello all: I'd like some advice on the best way to validate and confirm an e-mail address entered during a registration process. What we are thinking of is something like the following: 1. ...
5
by: rodchar | last post by:
hey all, in my page load i'm attaching a javascript confirm message to my save button. my problem is i have some client side validation which uses a Custom Validator web control and when i make...
8
by: rn5a | last post by:
I have gone through a no. of posts in this NewsGroup regarding my problem but alas, couldn't come across one which would have helped me in resolving the issue. My problem is this: An ASPX Form...
1
by: Carlo | last post by:
I am trying to seek the following functionality: A user clicks on a download buton I can automatically download a file, but since in the end i must end the response, its either the download or...
2
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I change the confirm box to say yes/no or default to cancel?...
3
by: jainritesh | last post by:
Hello All, I want to confirm that the user is registered member before he is redirected to download link. How do i read URL stored in DB and redirect user to this URL in PHP, if there is no...
4
by: Nik0001 | last post by:
Hello everyone! I have the following problem I need to download several HTML pages and get meta-tags out of the code. I decided it would be better to download only the meta-tags rather than...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.