 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Félix GUILLEMOT Guest
|
Posted: Fri Jul 25, 2003 9:35 am Post subject: How to use HTMLDocumentEvents with TWebBrowser ? |
|
|
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
|
Posted: Mon Jul 28, 2003 9:40 am Post subject: Re: How to use HTMLDocumentEvents with TWebBrowser ? |
|
|
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 |
|
 |
|
|
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
|
|