javascript: increase set of image

Joined
12 Feb 2006
Posts
17,637
Location
Surrey
i have x amount of images stored in an array, javascript shows 4 at a time starting with 0 then plus 3 more. to view the other sets js has created links to view the first second third etc set whichis works out by deviding the total image by4 and adding 0.49,and then rounding the number to get how many sets are needed.

the troulbe im having is getting it so that when the user clicks on a set they want, js then changes the images accordingly.

I have the links with an onclick function that i made change the number image it starts with, which when the page loads is 0 but say you click set 2, it changes the starting image to 3 . the only problem is the function doesn't change the starting image as a refresh of the page is needed to view the new images whichgets set back to 0

how can i mkae it so when the user clicks next set it keeps the starting image as the one the user clicked?
 
Back
Top Bottom