Autor Beitrag
muetzenjoe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 56

Win XP / Win Vista
# Delphi 6 Enterprise; # HTML Editor Phase 5; # Ulead Gif Animator 5;
BeitragVerfasst: Mo 19.02.07 21:09 
ich lasse ein feld einer html seite ausfüllen. klappt auch normal aber wenn ich diese eingabefeldernamen über eine variable übergeben will klappt es nicht. wieso?

hier mal ein beispiel:

das klappt!
ausblenden Delphi-Quelltext
1:
Document.all.item('nummer').value := Edit1.Text;					


das klappt nicht!
ausblenden Delphi-Quelltext
1:
Document.all.item(serv_nummer).value := Edit1.Text;					


wieso nicht? ich muss das leider mit variablen machen da sich die eingabefelder namen ständig ändern und ich sie aus einer ini datei auslese. (normalerweise sind diese daten auch noch codiert was dann also so aussehen müsste:
ausblenden Delphi-Quelltext
1:
Document.all.item(codierer(pchar(serv_nummer))).value := Edit1.Text;					

aber das MUSS nicht unbedingt.

hoffe mir kann da jemand helfen und es mir erklären. vielen dank im vorraus!

Moderiert von user profile iconChristian S.: Delphi-Tags hinzugefügt

_________________
Sind wir nicht alle ein wenig Newbee???
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Mo 19.02.07 22:37 
Welchen Fehler meldet Delphi denn genau? Compile-Time-Error oder Runtime-Error?

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Mo 19.02.07 23:25 
Hallo,

ein ähnliches Problem gab es hier schon mal:
Problem mit Formular ausfüllen

Die Lösung, etwas ungewöhnlich, aber funktioniert:
ausblenden Delphi-Quelltext
1:
2:
//Document.all.item(serv_nummer).value := Edit1.Text;
Document.all.item(''+serv_nummer+'').value := Edit1.Text;

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
muetzenjoe Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 56

Win XP / Win Vista
# Delphi 6 Enterprise; # HTML Editor Phase 5; # Ulead Gif Animator 5;
BeitragVerfasst: Mo 19.02.07 23:40 
ich hatte selber schon überlegt es so zu machen aber dachte, ach was... man hätte ich es nur mal getestet *g

danke klappt!

_________________
Sind wir nicht alle ein wenig Newbee???