Autor Beitrag
kabizolis
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 86



BeitragVerfasst: Do 21.12.06 18:04 
hallo,

in einer webseite habe ich verschiedene user. diese user haben in ihrem profil ein bild von sich...
ich will mich, wenn ich deren ID eingebe, deren bild in einer TWebBrowser-komponente anzeigen lassen...

das bild befindet sich jeweilen in einem DIV mit id "div_dreamer_img"...

ausblenden XML-Daten
1:
2:
3:
<div id="div_dreamer_img">
<img src="/images/user_pics_L/U4e6351bfd.jpg" width="180" height="180" alt="dreamer" border="0">
</div>


wie kann ich nur dieses div anzeigen lassen?

ich weiss, dass die lösung einfach sein wird aber mein hirn ist blockiert...

danke für die antwort!

Moderiert von user profile iconChristian S.: Code- durch XML-Tags ersetzt
Coder
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1383
Erhaltene Danke: 1

WinXP
D2005 PE
BeitragVerfasst: Do 21.12.06 18:34 
Lad das Bild /images/user_pics_L/U4e6351bfd.jpg runter und zeigs an.
Oder muss es das div sein?

MfG
kabizolis Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 86



BeitragVerfasst: Do 21.12.06 18:51 
ja herunterladen gefällt mir... wie kann ich das tun?
Coder
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1383
Erhaltene Danke: 1

WinXP
D2005 PE
BeitragVerfasst: Do 21.12.06 19:27 
Such mal nach URLDownloadToFile.
Und das Bild lädst du dann in ein Image.

MfG
Andidreas
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 114

Windows XP Pro
BDS 2006
BeitragVerfasst: Do 21.12.06 20:26 
Oder so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
procedure TForm1.Button1Click(Sender: TObject);
var
 lStream: TFileStream;
begin
  lStream:=TFileStream.Create('D:\Temp\ft_vor.jpg', fmCreate or fmShareDenyNone);
  try
    idHTTP1.Get('http://www.sdlaunch.de/images/ft_vor.jpg', lStream);
  finally
    lStream.Free;
  end;
  Image1.Picture.LoadFromFile('D:\Temp\ft_vor.jpg');
end;


In uses noch JPEG einfügen. Namen und Spreicherort anpassen.
Coder
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1383
Erhaltene Danke: 1

WinXP
D2005 PE
BeitragVerfasst: Do 21.12.06 21:41 
Bei der Lösung von Andidreas musst du noch ein TIdHTTP auf deine Form packen.
Ist aber nicht bei allen Delphiversionen dabei.

MfG