Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6210785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:13:18+00:00 2026-05-24T06:13:18+00:00

I believe that this question has been asked in a few different forms, but

  • 0

I believe that this question has been asked in a few different forms, but I’ve read quite a few different responses.

At first, I had a web-application written with mostly jQuery that would make use of servlets to retrieve information from various locations JavaScript could not access (ie. Feeds, images from a server, etc.). Now, however, I’ve been told to do away with the servlets and application configuration classes so that this project of mine contains only HTML, CSS, and JavaScript/jQuery. Rather than pulling the images off of the server, I need to retrieve them from a local file on the computer. I know that allowing this might seem like terrible design, but it’s what I’ve been asked to do. At any rate, what I really need to do is count the number of image files in a directory and then perhaps compile an array of the filenames themselves. I could do this fine in Java when using the servlets, but without them, I’m not sure how or even if this can be done.

I’m basically trying to use the jQuery Cycle plug-in to cycle through these images like a slideshow. I inject (or $(“#div”).append()) these images into the div by using a loop based on the number of images present.

So, is there a way I can do this with using JavaScript, HTML, jQuery plug-in, etc? I’d like to avoid using PHP and Java at this point…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T06:13:21+00:00Added an answer on May 24, 2026 at 6:13 am

    You can’t just read a directory with JavaScript; however, there appears to be a way to “exploit” how browsers function using http://www.irt.org/articles/js014/. It may not be pretty, but the demo works in the latest Chrome and IE7-9 for me. I’m sure some of the techniques could be updated to use cleaner code if you’d like to improve upon it.

    EDIT:
    Another technique you could use can be found in Javascript read files in folder

    It definitely looks to be a cleaner solution. What I’d recommend is extracting the body contents to inject into a hidden div or using the path for an iframe that you can read from.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can see that this question has been asked several times, but none of
I see that this question has been asked before but the context around the
I believe this question has been asked before. I tried looking for it but
While I'm perfectly willing to believe that this has been asked elsewhere, I haven't
I'm almost sure this question has been asked before, but for the love of
Apologies if this question has been asked already, but suppose we have this code
I know this question has been asked alot of times, however most of them
I know this question has been asked many times and I've researched it myself
You're probably thinking this has been asked a million times before but I think
I realise this question has been asking before, but I've yet to find an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.