Autor Beitrag
DiamondDog
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 460



BeitragVerfasst: Do 29.01.09 10:54 
Hallo Leute,
ich hab mir ein kleines Login Programm geschrieben welches mir den Quelltext ausließt, das funktioniert auch soweit ganz super. Mein Poroblem ist aber das das auf der Seite auch Java Script ist, dieser aber bei aufruf nicht funktioniert.
Kann mir jemand sagen, wei ich es machen muß das JS auch mit funktioniert?
Wenn ich die Seite ganz normal im Browser öffne dann geht es, aber mach ich es mit meinem Programm funktioniert alles biß auf JS.

So hab ich es jetzt:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
begin
  Filestream := TIdMultiPartFormDataStream.Create;
  idhttp1.AllowCookies := true;
  idhttp1.HandleRedirects := true;
  idhttp1.Request.UserAgent:='Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1)';
  Filestream.AddFormField('username', ComboBox1.Text);
  Filestream.AddFormField('password', Edit2.Text);
  Filestream.AddFormField('submit''Login');
  Seitenquelltext := idHTTP1.POST('http:test.de',Filestream);
Danke schon mal fürs Helfen.

Mfg Dog
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 29.01.09 13:37 
Die idHTTP Komponente ist ja auch kein Browser, also wird auch kein JavaScript ausgeführt. Die idHTTP Komponente bildet lediglich das HTTP Übertragungsprotokoll ab und interpretiert keinerlei Inhalte!

_________________
In the beginning was the word.
And the word was content-type: text/plain.
DiamondDog Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 460



BeitragVerfasst: Do 29.01.09 14:20 
Hmm...
Ok gibts es dann vll ne Möglichkeit sich anzumelden und die Seite so zu laden das auch JS akiv wird und wenn Js aktiv ist dann den Quelltext auslesen?
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19315
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Do 29.01.09 14:30 
Du müsstest das was der JavaScript-Code macht eben herausfinden und selbst machen.

Ansonsten bleibt nur eine Komponente, die auch JavaScript kann: TWebBrowser und ähnliche Komponenten.
DiamondDog Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 460



BeitragVerfasst: Do 29.01.09 14:35 
Kann ich mich den mit dem TWebBrowser auch so anmelden wie oben wenn ja gibts da vll ein Beispiel zu? Dann würd ich mich per TWebBrowser einlogen und dann den Quelltext auslesen wenn das geht. Die Frage ist dann halt nur wie das geht :)
DiamondDog Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 460



BeitragVerfasst: Fr 30.01.09 16:18 
Kann mir den niemand sagen wie ich anstelle von idhttp1 den Login, über den WebBrowser hinbekomme?
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19315
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Fr 30.01.09 17:26 
Schau mal hier:
www.swissdelphicente...component=Webbrowser

Zum Beispiel zum Abschicken:
www.swissdelphicente...showcode.php?id=1604

Und hier findest du auch noch jede Menge Links:
forum.delphi-treff.d...howthread.php?t=4791
DiamondDog Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 460



BeitragVerfasst: Fr 30.01.09 19:48 
Ok cool Danke hab glaub ich was passendes gefunden.