Einzelnen Beitrag anzeigen

Benutzerbild von toms
toms
(CodeLib-Manager)

Registriert seit: 10. Jun 2002
4.648 Beiträge
 
Delphi XE Professional
 
#14

Re: POST Formular ausfüllen + Werte ablesen

  Alt 14. Jul 2008, 07:28
Hallo, was hindert dich daran, WB_SetFormValue in WB_GetFormValue umzuschreiben?

Delphi-Quellcode:
function WB_GetFormValue3(WB: TWebbrowser; FieldName: string): string;
var
  iForms, iItems: Integer;
  FormItem: OleVariant;
begin
  Result := '';
  for iForms := 0 to WB.OleObject.Document.forms.Length - 1 do
  begin
    FormItem := WB.OleObject.Document.forms.Item(iForms);
    for iItems := 0 to FormItem.Length - 1 do
    begin
      try
        if SameText(FormItem.Item(iItems).Name, FieldName) then
        begin
          Result := FormItem.Item(iItems).Value;
        end;
      except
      end;
    end;
  end;
end;
Thomas
  Mit Zitat antworten Zitat