Autor Beitrag
chukalv
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 44



BeitragVerfasst: Di 22.02.05 08:56 
How can I click on a radio form in a Twebbrowser?
I have a button like this:
ausblenden Quelltext
1:
<INPUT TYPE=radio NAME=rating VALUE=5 onClick="if(pressed.value==0){pressed.value=1;this.form.submit()}">					



I know how to slect it :
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
var
  Document: IHTMLDocument2;
  rbTestList: IHTMLElementCollection;
  rbTest: IHTMLOptionButtonElement;
  I: Integer;
begin
  Document := WebBrowser1.Document as IHTMLDocument2;
  rbTestList := Document.all.item('rating', EmptyParam) as IHTMLElementCollection;
  for I := 0 to rbTestList.Length - 1 do
  begin
    rbTest := rbTestList.item(I, EmptyParam) as IHTMLOptionButtonElement;
  end;
  for I := 0 to rbTestList.Length - 1 do
  begin
    rbTest := rbTestList.item(I, EmptyParam) as IHTMLOptionButtonElement;
     if rbTest.Value = '5' then
      rbTest.Checked := True;
  end;


BUT I CAN`T GET the javascript working... Please help me...