Is there a way, in Javascript, to get a list of files in a folder (on a server) that I can dynamically load into an array that I can work with when a page loads?
ms_sws
0
Light Poster
Recommended Answers
Jump to PostI am not aware that we can do in javascript, but we can make it in PHP.
Jump to PostIs there a way, in Javascript, to get a list of files in a folder (on a server)
If your server is configured to block directory access (most are), then no: you need to use server-side scripting.
In the unlikely event that it isn't so configured, then a qualified …
Jump to PostI need to run your test html page NOT from the root directory but on a folder under the root directory?
<emphasis added>
Yes. If you place it in your root directory, you won't get a directory; all you will get is your default page.
When I place this …
Jump to PostWhat do I do to test this against a sub-folder off the root?
Install it in the desired sub-directory or sub-folder.
next question will be how do I get the results to load into an array using javascript
If you succeed at step 1 I can make some suggestions.
Jump to PostOK :)
First I'll show you the folder/sub part, then we'll do the rest.
All 17 Replies
rajarajan2017
fxm
23
Posting Pro
ms_sws
0
Light Poster
fxm
23
Posting Pro
ms_sws
0
Light Poster
fxm
23
Posting Pro
ms_sws
0
Light Poster
fxm
23
Posting Pro
fxm
23
Posting Pro
ms_sws
0
Light Poster
fxm
23
Posting Pro
ms_sws
0
Light Poster
fxm
23
Posting Pro
ms_sws
0
Light Poster
fxm
23
Posting Pro
fxm
23
Posting Pro
ms_sws
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.