469,361 Members | 2,217 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,361 developers. It's quick & easy.

Hierarchical Image Gallery

My goal is to create essentially two galleries on a single page, in which the first gallery determines what the second gallery displays. For instance, the first gallery refers to the contents of the main image folder. The second gallery would be a folder inside the main image folder. Depending on which image is displayed, the first gallery's image would trigger the second gallery's contents. I suppose this is sort of a hierarchal gallery system. Is this somewhat easily possible in javascript or would it be more feasible to execute in flash/xml? Thanks.
Nov 13 '06 #1
1 2104
16,027 Expert Mod 8TB
It should be possible, but will be made easier if the code is generated properly from the server-side. Store the second gallery image sources in arrays. When an image changes in the first gallery (onclick?), load the second gallery from the corresponding array. To do that, use another array to map the first gallery images to its set of images in the second gallery. To change images, change the src property of the images. There are other alternatives to this too, e.g. storing in XML and using JavaScript to parse the file.
May 28 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Perttu Pulkkinen | last post: by
8 posts views Thread by Chris Dewin | last post: by
4 posts views Thread by RE Kochanski | last post: by
10 posts views Thread by cjparis | last post: by
25 posts views Thread by Gilles Ganault | last post: by
4 posts views Thread by saunders1989 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.