jQuery Photo Gallery

asp_net2
asp_net2 used Ask the Experts™
on
Hello Experts,

Is there a jQuery plugin or Javascript code that will display photos in a folder?

I have a client that would owns a Photography Studio and he would like to be able to just upload photos to a specific folder on the website and for the photos to automatically appear within rotation. He doesn't want to use any webservice or anything complicated to do this. He would just like to simple copy the photos from his computer and upload them to a directory and that's it.

I would like to be able to use either jQuery or Javascript to do this.

Thanks in advance!!!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Data Scientist
Most Valuable Expert 2014
Commented:
This would typically be done in combination with something like PHP.

this snippet will display images from the "images" directory.
<?php    

              $filenames = glob("images/*");
             
                    foreach($filenames as $file){

                       echo "<img src=images/".$file. "/><br/>";
                    }
                ?>

Open in new window


(make sure your file extension is .php)
Kyle HamiltonData Scientist
Most Valuable Expert 2014

Commented:
You can of course do a lot more than display the images as a list. You could implement a javascript gallery for example that fades the images in and out... the sky's the limit!

Author

Commented:
Can you help me or provide me JavaScript code to do that instead of php?
Kyle HamiltonData Scientist
Most Valuable Expert 2014

Commented:
I'm pretty sure you can't read a directory with javascript. Even if it's on the same domain.
Jon NormanInformation Systems Manager
Top Expert 2012

Commented:
it would need to be some sort of code like php working on the server to get the names of the files, once that is done you can then style it with javscript in the front end with something like http://jquery.malsup.com/cycle/

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial