Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Mar : post the form
| Subject: | post the form |
| Posted by: | "Adam" (suppo..@borlandbbs.cn) |
| Date: | Mon, 20 Mar 2006 09:43:29 |
this is my codes:
....
procedure TForm1.Button1Click(Sender: TObject);
var
Doc:IHTMLDocument2;
input:OleVariant;
userinputelement,pwdinputelement:ihtmlinputelement;
begin
doc:=Webbrowser1.document as ihtmldocument2;
userinputelement:=(doc.all.item('user',0) as ihtmlinputelement);
userinputelement.value:=edit1.text;
pwdinputelement:=(doc.all.item('password',0) as ihtmlinputelement);
pwdinputelement.value:=edit2.text;
input:=doc.all.item('submit',0);
input.click;
end;
....
but there is something wrong with 'doc:=Webbrowser1.document as
ihtmldocument2;'.
could you help fix it?
Thank you