Autor Beitrag
georgeboy
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 198



BeitragVerfasst: Sa 23.11.19 14:43 
Hallo zusammen, wieder einmal, bin schon ewig auf der Suche, wie lädt man ein oder mehrere Bilder, Graphiken mit Ajax vom Server, zum Browser, mit Javascript ?
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4764
Erhaltene Danke: 1052

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Sa 23.11.19 15:37 
Verwendest du jQuery? Dann sollte es recht einfach sein: Loading content with jQuery AJAX (und in Loading content with jQuery AJAX - using a loading image mit Ladebild).
Und als HTML benutzt du dann einfach <img src="..."/>.
georgeboy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 198



BeitragVerfasst: Sa 23.11.19 16:04 
Vielleicht stelle ich mich dumm an, ich möchte vom Server eine Datei mit Bilddateinamen herunterladen, und dann die einzelnen Bilder herunterladen, mit einem Text versehen, die Bilder dynamisch in mein HTML-Dokument einbauen, und dann einen EventHändler einrichten, der für alle Bilder gleich ist. Alternativ eine SQL Datenbank einbauen, und davon lesen ... mit JQuery muss ich mich noch befassen. Bei Ajax gibt es das XMLHttpRequest Objekt, da gibt es die Möglichkeit mit reponseText bzw responseXML Daten vom Server zu laden, aber wie wird daraus eine Graphik ?
georgeboy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 198



BeitragVerfasst: Sa 23.11.19 16:44 
Bei jQuery gibt es die Methode: load, damit müssten sich auch Bilder laden können, dann wäre das Problem gelöst !