Thursday, December 14, 2006

javascript circles

I'm working on putting together an image library viewer page on my site using javascript (for various reasons it has to be javascript). Basically, there are links along the left that each represent a separate slideshow (individual images are not listed). When a link is clicked the slideshow should play in the righthand side of the window. Ok. Thing is, I'm having trouble figuring out how to get each different slildeshow to play in the window when its link is clicked without calling a whole entire separate function for each slideshow. (Just to make things more interesting, I also have a series of captions that run with each image on the slideshow.) I've got each slideshow/captions stored in a separate set of arrays. So many little things have to change withig the function for the function to work (differing sizes of arrays, etc.) for each slideshow, and I can't seem to figure out how to change them all systematically. For one attempt, I've replaced things with variables and created another function around the function that plays the slideshow and attempted to pass a variable through it stored in the link and re-define the variables for the slideshow function using a switch statement. This is also clunky and not working properly. Does anyone have code for a working slideshow I could test this method on? I'm not sure if my slideshow function is ideal. Does anyone think this is a poor method or have another suggestion? A way to do this with an external script? I'm going to try to iron out the code some more and I'll put it up later when its readable. Thanks!

0 Comments:

Post a Comment

<< Home