Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to determine if the HTML page is the right one (TWEBBROWSER)?

4 views
Skip to first unread message

frank

unread,
Sep 21, 2007, 6:26:49 AM9/21/07
to
Hi there,

I am using Delphi 7 and I am pretty new with TWEBBROWSER. I would
appreciate some help in finding a way to solve this, perhaps some
sample code.

How can I determine if the HTML page returned from the URL
(twebbrowser.navigate) is indeed from the server and not the search or
cancel page which normally appears when a server is not reachable.

I have tried to use OnDocumentComplete, using the following condition
but it does not work as expected.
The condition seems to be true even when the server is not reachable.
In such case the page "Navigation to the webpage was cancelled" is
automatically loaded by the Twebbrowser.

if Assigned(Webbrowser1.Document) then
begin
showmessage ('Document downloaded')
end;


Best regards,
Frank

0 new messages