Navigation Menu
Alphabetical Listing
Site Contents

Site FAQ
About JSS
JavaScript Forum
JavaScript Tutorial
Friends of JSS

Link to Us
JavaScript Help
Contribute a script
Technology Jobs

Become a Partner

Internet.commerce

Be a Commerce Partner














Internet.com

IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Developer Channel

FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

Great Sites

DocJavaScript.com
dhtml.com
The Freebie Directory
TheFreeSite.com

Browse Doc JS's Tips!


Hiermenus Central


Promotions

Free Announcements


Social Bookmark

General

Use this script to display images, one at a time, on your Web page. Very easy to set-up, and includes captions.


information
The beautiful mountains

« Previous | Next »

Notes

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: simpleImageGallery.js


Head

Paste this code into the HEAD section of your HTML document.


Body

Paste this code into the BODY section of your HTML document


User Comments

Add a comment, suggestion, or correction
[For questions about usage, consult the Notes tab above or visit the JavaScript forum. Do not include more than two (2) lines of code in your comments. If you have suggestions or corrections, you can submit them to us.]

    
   
       
[optional]
 
[optional]

   

Comments feed Comment Feed RSS 2.0

26. From: Drew
Why can't I see the subtitles?
11/13/2008 19:16:46

When the page first loads, the first image has the right subtitle, but if I click a button, they all say "undefined". How can I fix that?

27. From: Lee (Admin)
11/18/2008 11:12:08

Drew,

It's hard to say because I would need to look at how you have implemented the script. Your question is beyond the scope of these comments. You will need to post it over on the JavaScript forum. Thanks!

28. From: Drew
How could i link the images?
11/06/2008 16:20:05

This works great, but would like to know how i could link each image to its own file url. First off, would i have to change that on the js. file or in the body or both? And what is the easiest way to do that?

29. From: Lee (Admin)
12/02/2008 10:34:03

You can check the author's script listing or contact him directly (his e-mail is listed on his site).

23. From: Marlene
Great script!
08/30/2008 18:44:38

I really like the looks of this image gallery and want to use it, however I cannot get it to advance to the next image. Is there any way to get some help on this?

24. From: Lee (Admin)
10/31/2008 15:18:55

Sure. You can post your quesion over on the JavaScript forum. They will be able to help you. Thanks!

21. From: EJP
Ineffective Instructions-simple image gallery
08/23/2008 20:04:53

This script has insufficient instructions and in-effective replies such as, "due to the limitations of these question you will need to submit your question to the javascript forum for further help."
There is plenty of room for replies here; and if a script is to be posted here, one should be prepared to provide ample instructions and responses to questions.

As written/explained, this script shows one image and one caption. The notes do not explain how to expand and inter-relate the external code to the body content code to display other images.

22. From: Lee (Admin)
10/31/2008 15:14:04

The notation at the top of these comments clear states: "For questions about usage, consult the Notes tab above or visit the JavaScript forum." This area is for comments and suggestions. It is not a forum, that's why you are directed to the forum.

25. From: Andrew
IE6
08/21/2008 19:02:42

This works perfectly for me in FF 3. I added some php to it to grab filenames and locations from a database so they are displayed dynamically without having to statically declare anything.

However in IE6 when it gets to the end of the array(picture 10 of 10 for example) it doesn't properly loop around and redirects to index.php. Anyone know why this might be?

17. From: Brent
easy maint
03/02/2008 09:31:36

I forgot to comment how easy it is to add images to the script - you don't need to change the "array.length" - it does that all for you. Cool.

next comments...

Do you write JavaScripts?
If you do, why not submit them to us?
We'll give you credit and a link back to your Web site.