Solved

TWebBrowser navigate

Posted on 2008-06-25
6
552 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:
2266180 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Comparing dates in Delphi. Greater than/ Less than 3 156
When I am typing into a TEdit last word repeats 7 135
Delphi: Connect to running MS Outlook 4 91
update joined tables 2 47
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

831 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