The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Create slideshow from source folder, Slideshow of photos contained in content folder
joeseppe69
post Aug 15 2019, 01:09 PM
Post #1





Group: Members
Posts: 2
Joined: 15-August 19
Member No.: 26,958



Is there a way to have a slideshow of all the photos uploaded into a specific folder?

I can create a simple slideshow in HTML but I would need to list each of the photo file names within the code.

If possible, I would rather the code be static and simply look to a specific folder where all the photos are stored and create the slideshow for all those images.

Like that, if I wanted to change the photos in said folder, refreshing the page will the make the slideshow with the new photos and the core HTML code does not need to be edited.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Aug 15 2019, 01:20 PM
Post #2


Programming Fanatic
********

Group: Members
Posts: 1,638
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



In Javascript, No. But it can be done server side. (PHP, ASP, ...)

You can use server side code to generate a list of all files in the folder, encode it as JSON and send it to the client (which Javascript can then use).

This post has been edited by CharlesEF: Aug 15 2019, 01:24 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Aug 15 2019, 05:52 PM
Post #3


.
********

Group: WDG Moderators
Posts: 8,206
Joined: 10-August 06
Member No.: 7



QUOTE(CharlesEF @ Aug 15 2019, 08:20 PM) *

encode it as JSON

Or just let the server-side script print out the javascript part containing the file names...
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
joeseppe69
post Aug 16 2019, 12:56 AM
Post #4





Group: Members
Posts: 2
Joined: 15-August 19
Member No.: 26,958



Never used PHP or ASP before.

I am just trying to create a simple dashboard for school Reception area.

Just using HTML to layout the screen and content, without actually having a web server.

Any advice on best way to proceed.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Aug 16 2019, 04:31 AM
Post #5


.
********

Group: WDG Moderators
Posts: 8,206
Joined: 10-August 06
Member No.: 7



Will the finished page be run from a web server? You'd need one in order to run server-side scripts. But it's not possible for (client-side) javascript to view the files of the client computer, for security reasons.

Maybe there are Windows programs that can generate a list of files as well (and then you'd just manually copy that list to the slideshow script code).
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 16 2019, 07:59 AM
Post #6


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,352
Joined: 9-August 06
Member No.: 6



QUOTE(Christian J @ Aug 16 2019, 11:31 AM) *

Maybe there are Windows programs that can generate a list of files as well (and then you'd just manually copy that list to the slideshow script code).


Some text editors even. wink.gif

Or, available on every Windows PC. Bring up a command prompt and in the directory in question and type...
CODE
dir /b /a-d


Or if you want to pipe the list to a file...
CODE
dir /b /a-d > list.txt

The list may include the name of the text file too.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 21st August 2019 - 09:01 AM