Solved

TWebBrowser navigate

Posted on 2008-06-25
6
547 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
6 Comments
 
LVL 28

Accepted Solution

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

Expert Comment

by:Geert Gruwez
ID: 21863441
use the event
DocumentComplete


0
 
LVL 37

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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:ciuly
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now