/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Quick image-swap code needed!

I have implemented a javascript slideshow that allows users to stop, play, and advance forward and backward through a series of images. This feature already works fine, using an onClick rotateImage tag. I’ve since decided to add a small thumbnail image map to the right of the slideshow. I want give the user the ability to click any thumbnail and have the slideshow go immediately to that image and stop. Sounds simple I know, but I just can’t get the code right.

You can find what I have done at: [url]http://www.coastalclothesline.com/gallery.html[/url]

PLEASE HELP! Feel free to e-mail if you’d like as well, looking to get this working ASAP.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@GirasquidNov 09.2006 — Why not have an array of paths to images, and then have each click call something like this?

<i>
</i>function gotoSpecificImage(imageNumber) {
document.getElementById('imageBox').src = imagesArray[imageNumber];
}


With 'imageBox' being the id of the image tag that is displaying your images for you.
Copy linkTweet thisAlerts:
@robmarstonauthorNov 09.2006 — If you could code the whole thing, that'd be real helpful. What I have on the page now is pretty much cut & paste, I don't know too much about the coding other than the fact that what I have now works.

The coding for the control buttons looks like this: onClick="rotateImage('rImage'); clearTimeout(timerID)"

This moves forward one image, and stop the slideshow on that image in the form of a next button.

"rImage" is the name for the html tag "placeholder." In other words, there's an regular "img src" tag that has "name="rImage" in it.

I know I can swap something into this spot, I just don't know how to call on a specific image.

THANKS FOR YOUR HELP.
Copy linkTweet thisAlerts:
@robmarstonauthorAug 15.2012 — Marking this resolved because it's outdated.
×

Success!

Help @robmarston spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...