PDA

View Full Version : STUCK


kies
23.05.2001, 10:56
hello peeps,
i have a dilemma. i'm making an art gallery for my group's intranet site at work. i have an index at the top, but i'd also like to have a next feature under the image. how can the next function know what number image is up? since its intranet, i only have to worry about ie5x, which is cool. i have a mock-up of the code here:
http://www.phisigmapiaz.org/images/bkg/linkedImg.html
any ideas on this one are appreciated. i though about a scrolling display, but all the images are diff sizes so that would get messy. but my main problem is how to implement a next function. please help, site is supposed to go live tomorrow!

//kies

Dan
23.05.2001, 11:20
Use a variable such as <font face='Courier New'>currentImage</font id='Courier New'> to store which image is currently in use. Set it equal to one at the start then when ever you use switch(i) set <font face='Courier New'>currentImage = i</font id='Courier New'>.
Then on your next button use <font face='Courier New'>switch(currentImage+1);</font id='Courier New'>

(this topic probably belonged in "General DHTML" but nevermind...)

(checked out your "is JS/DhTML" dying thread <img src=icon_smile_wink.gif border=0 align=middle>, I made the colours go crazy ... lol)