Solved

TWebBrowser navigate

Posted on 2008-06-25
6
563 Views
Last Modified: 2008-07-04
Hi,

I am using TWebBrowser to access certain URL and then grab the content.

Do you know if we can detect the "end of transfer" of the TWebBrowser action?

Let say I am accessing http://www.example.com/ , my code is like this:

     WebBrowser1.Navigate('http://www.example.com');

But, how do I capture event if the Navigate process SUCCESS or FAIL ???

Thanks.
0
Comment
Question by:dudup
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 28

Accepted Solution

by:
2266180 earned 200 total points
ID: 21863423
use TEmbeddedWB (from http://www.bsalsa.com/) and use the OnNavigateError event
0
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 21863441
use the event
DocumentComplete


0
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 21863524
the last OnTitleChange event
gives the Error if the page can't be found
like 'Network Error'
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:maliger
ID: 21863674
I personally would use ReadyState.
DocumentCompltee is best of events (fired when ReadyState is changed to 4, which means document is ready for manipulations)

Other events are:
NavigateComplete, NavigateComplete2, DownloadComplete and LoadingComplete events
(only DownloadComplete fires on error)

NavigeteComple fires sooner (I think its on ReadyState=2) and you cant access read document in that phase. But you should stop any 'Loading' animation and so on this.
0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 21865863
>> I am using TWebBrowser to access certain URL and then grab the content

Are you working with the DOM, or just with the page content as raw text? The reason I ask is that a hosted browser may be overkill if your looking to just page scrape information. (Eg use of Indy components, etc, for perfoming an http get).

Russell


0
 
LVL 28

Expert Comment

by:2266180
ID: 21932658
B grade and no questions/requests. tipical.

you are now th 35th asker on my blacklist which means that I will no longer answer any of your questions. you might want to read and apply the grading tips and teh FAQ and help on how to work on EE, or you might find yourself with other experts blacklisting you.

no need to reply as I've unsubscribed from this question.

ejony
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses
Course of the Month6 days, 9 hours left to enroll

634 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