BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to use HTMLDocumentEvents with TWebBrowser ?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Usage
View previous topic :: View next topic  
Author Message
Félix GUILLEMOT
Guest





PostPosted: Fri Jul 25, 2003 9:35 am    Post subject: How to use HTMLDocumentEvents with TWebBrowser ? Reply with quote



Can someone give me an example of delphi code using HTMLDocumentEvents ?
In fact, i want to handle the click on a document(form) loaded in the
TWebBrowser :
if the user click on the submit button, i want to do something special in my
app.
Thanks


Back to top
Félix GUILLEMOT
Guest





PostPosted: Mon Jul 28, 2003 9:40 am    Post subject: Re: How to use HTMLDocumentEvents with TWebBrowser ? Reply with quote



YES ! YES ! YES !
merci pascal !

I've been searching all google groups without finding this article, so thank
you.
And thank you again and again to Deborah Pate who already help me in the
past with Ole containers...

Anyway, for those who are interested in, i share the code to intercept
submit click in a web browser :
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=VA.00001a31.007e245f
%40blueyonder.co.not-this-bit.uk

for Deborah's code (Event handler TEventObject) and then

procedure TDtlCrawlStart.FormBrowserDocumentComplete(Sender: TObject;
const pDisp: IDispatch; var URL: OleVariant);

var
doc : IHTMLDocument2;
i : integer;
el : IHTMLElement2;
FormElement : IHTMLFormElement;

begin

Doc := (pDisp as IWebBrowser).Document as IHTMLDocument2;
for i := 0 to Doc.Forms.length - 1 do
begin
el := doc.forms.item(i, 0) as IHTMLElement2;
FormElement := el as IHTMLFormElement;
FormElement.onsubmit := NewEvent;
end;
end;


"Pascal Chapuis" <pascal.chapuis (AT) NoSpam (DOT) online.fr> a écrit dans le message
de news: [email]3f212d76 (AT) newsgroups (DOT) borland.com[/email]...
Quote:
Hi Félix,

Look at Deborah Pate "TEventObject" class :

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=VA.00001a31.007e245f
%40blueyonder.co.not-this-bit.uk

or
You can also use "EventSinkImp" event sink generator from
http://www.techvanguards.com/

cheers,

pascal

"Félix GUILLEMOT" <felix.guillemot (AT) beaconseil (DOT) com> a écrit dans le message
de news: 3f20fa39$1 (AT) newsgroups (DOT) borland.com...
Can someone give me an example of delphi code using HTMLDocumentEvents ?
In fact, i want to handle the click on a document(form) loaded in the
TWebBrowser :
if the user click on the submit button, i want to do something special
in
my
app.
Thanks







Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Usage All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.