By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,269 Members | 1,507 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,269 IT Pros & Developers. It's quick & easy.

Hierarchical Image Gallery

P: 4
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
Share this Question
Share on Google+
1 Reply


acoder
Expert Mod 15k+
P: 16,027
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.