D
Darren
Hi All,
I'm trying to create a photo gallery. I have created the page and
placed the image (photo) in the center. Underneith it I have a list of
numbered links that display other images by using an image swap
script. That all works fine.
What I cannot work out, is how I can make 'previous' and 'next' photo
links work. I do not want to re-load the page each time or else it
would defeat the purpose of using the image swap. It would work though
I'd just use a QueryString or something.
I was thinking of using a variable... but I'm just not that good with
javascript.
What I had in mind is:
When the page is loaded the variable 'PhotoNumber' equals '1'
If the user clicks on link '3' under the photo the variable
PhotoNumber will need to change to 3, aswell as run the onClick image
swap event.
If the user clicks on the 'next' link the OnClick event will need to
know what the current photonumber is and add 1. Ie PhotoNumber =
PhotoNumber + 1. It will also need to change the PhotoNumber variable
and call the image swap.
Hope that makes sense, I'm still a newbie and can't javascript very
well. Any ideas would be appreciated.
Thanks in advance,
Darren Stahlhut
I'm trying to create a photo gallery. I have created the page and
placed the image (photo) in the center. Underneith it I have a list of
numbered links that display other images by using an image swap
script. That all works fine.
What I cannot work out, is how I can make 'previous' and 'next' photo
links work. I do not want to re-load the page each time or else it
would defeat the purpose of using the image swap. It would work though
I'd just use a QueryString or something.
I was thinking of using a variable... but I'm just not that good with
javascript.
What I had in mind is:
When the page is loaded the variable 'PhotoNumber' equals '1'
If the user clicks on link '3' under the photo the variable
PhotoNumber will need to change to 3, aswell as run the onClick image
swap event.
If the user clicks on the 'next' link the OnClick event will need to
know what the current photonumber is and add 1. Ie PhotoNumber =
PhotoNumber + 1. It will also need to change the PhotoNumber variable
and call the image swap.
Hope that makes sense, I'm still a newbie and can't javascript very
well. Any ideas would be appreciated.
Thanks in advance,
Darren Stahlhut