• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5541
  • Last Modified:

list/ display all images in a folder

Is it possible with Javascript to list all the images in a folder and display them as images files. There will only ever be jpgs so there is no need to sort them out from any other types of files.

1 Solution
erikTsomikSystem Architect, CF programmer Commented:
roscoeh23Author Commented:
no. anyone else?
b0lsc0ttIT ManagerCommented:

Where is the folder?  On the computer where the browser is or where the web page is?  What type of webpage (i.e. Internet, intranet, local)?

In general you can't use Javascript for this.  With Internet webpages this is especially true.  The Javascript can't search the web servers folder and browser security stops it from accessing folders on browser's computer.  With IE and ActiveX on a machine where the page is running locally then you could search the files in a folder.  In some cases the version of IE or security settings may stop this still and you will almost certainly have a "script" warning you will need to answer and allow.

If the images are on a web server and this is an Internet page then you should use a server language to do this (e.g. ASP, PHP, Perl).

Let me know if you have any questions or need more information.

Forced accept.

EE Admin
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now