Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

TWebBrowser navigate

Posted on 2008-06-25
6
Medium Priority
?
568 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 600 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
Independent Software Vendors: 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

722 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