Zitat:
Jedenfalls meckert Delphi immer, wenn ich versuche, einen Text aus einem Memo in die textarea einzutragen.
Delphi-Quellcode:
function WB_SetFormValue(WB: TWebbrowser; FieldName, sValue: 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
FormItem.Item(iItems).Value := sValue;
end;
except
end;
end;
end;
end;