It is necessary to create several DIVS, and inside write this php code? - Lisette commented on June 10th 19 at 14:30
or he is in order to make exactly as many DIVS as there are pictures? - Lisette commented on June 10th 19 at 14:33
Will make so much, how many elements will be in the returned array (read - image file directory).
Cool feature! To my shame - didn't know about it. - rhianna_Fee commented on June 10th 19 at 14:36
tell me please, where may be error? code white not working - Lisette commented on June 10th 19 at 14:39
, turn on error reporting or look in the error log.
It seems that the path is incorrect, it is unlikely that you in the root FS folder is slick - Austen.Thompson53 commented on June 10th 19 at 14:42
Betty_Huels answered on June 10th 19 at 14:29
Solution
You can do this on the client side, not server.
for (i=0; i<3;i++) {
var img = document.createElement("img”);
img.src = "images/image" + i + ".png";
img.width = "150";
img.height = "150";
document.getElementById("templates").appendChild(img);
};
Will load photos from a folder on the server?
JS is able to work in the server file system? - Lisette commented on June 10th 19 at 14:32
Yes , you can just create a lot of tags with img tags inside and tell them to your server, folder image for example. The advantages of this methods is that you can automatically load images without reloading the page.
PS. Don't forget to put the boot images on the event window.onload - Lisette commented on June 10th 19 at 14:35
thank you! - rhianna_Fee commented on June 10th 19 at 14:38
But this will work only if the numbers of symbols in order. And where the script should know how many pictures of everything. - Lisette commented on June 10th 19 at 14:41
Cool feature! To my shame - didn't know about it. - rhianna_Fee commented on June 10th 19 at 14:36
It seems that the path is incorrect, it is unlikely that you in the root FS folder is slick - Austen.Thompson53 commented on June 10th 19 at 14:42