Autor Beitrag
tmkb
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 59



BeitragVerfasst: Di 08.10.02 17:43 
Hi,

ich will ein input=textarea per programmm ausfüllen...ich hab auch schon alles, nur funzts am ende nicht...
ausblenden Quelltext
1:
WebBrowser1.OleObject.Document.Forms.item(0).elements.item('feld').Value:='loesung';					

so würde es das Wort "lösung" in das feld reinschreiben...aber wie kann ich es machen, dass der text von memo1 in die textarea geschrieben wird?
WebBrowser1.OleObject.Document.Forms.item(0).elements.item('feld').Value:=memo1.lines;<- das funktioniert nicht...

thx!
tmkb

(09.10.02 09:30 Tino) Code-Tags hinzugefügt.
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Di 08.10.02 18:56 
Hi,

wenn Du das hier schreibst:
ausblenden Quelltext
1:
WebBrowser1.OleObject.Document.Forms.Item(0).Elements.Item('Feld').Value := 'loesung';					

dann weist Du ja dem Property Value einen String zu. Wenn Du dann mal in der Hilfe schaust vom welchem Type das Property Lines (von tMemo) ist dann siehst Du das das nämlich nicht zuweisungskompatibel ist. Versuch es mal so:
ausblenden Quelltext
1:
WebBrowser1.OleObject.Document.Forms.Item(0).Elements.Item('Feld').Value := Memo1.Lines.Text;					

Sollte dann funktionieren!

Gruß
TINO
tmkb Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 59



BeitragVerfasst: Di 08.10.02 22:22 
Oh danke, cool, jezz hab ich bloß schon das nächste Problem:

Mit
ausblenden Quelltext
1:
WebBrowser1.OleObject.Document.Forms.item(0).submit;					

drückt man ja den submit button....bloß hats auf der form die ich meine, 2 submit buttons..Hier der Quelltext auf der Page:
ausblenden Quelltext
1:
2:
<input type="submit" tabindex="5" name="preview" class="mainoption" value="Vorschau" />
<input type="submit" accesskey="s" tabindex="6" name="post" class="mainoption" value="Absenden" />

Beim normalen submit button, drückt er den ersten, ich will aber dass er den zweiten drückt! wär cool wenn mir das noch jemand sagen könnte!

(09.10.02 09:30 Tino) Code-Tags hinzugefügt.
DaKirsche
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 187

Win XP Pro, SuSe Linux 7.3 - 10.2, Win 2k3 Server, Win 2000, Win NT 4.0
Delphi 2006 Pro, Java, HTML, SQL, PHP, CSS
BeitragVerfasst: Do 09.11.06 19:44 
ist zwar schon veraltet, aber trotzdem :

ausblenden Delphi-Quelltext
1:
WebBrowser1.OleObject.document.forms.item(0).elements.item('post').Click;					



Du sprichst das Objekt mit NAmen an...nicht mit Typ