I\'d like to count the number of files in a folder and return that number to set a variable in a .js file.
Essentially, I have X number of images in a folder. When t
If you must use client side and the files are numbered, preload the file and set the number when you get an error
... Img = new Image(); Img.onerror=function() { maxImages=cnt-1; } Img.src = "image_"+cnt+".jpg";