/    Sign up×
Community /Pin to ProfileBookmark

Voting with pictures

I’m really new to JavaScript but fairly experienced with programming in general. Any help would be great. Cheers ?

I have sixteen pictures. I want the first four to appear next to each other. The user then clicks what picture is there first choice. That picture will then say “Winner” below it.

They then pick a second picture (it can’t be the one they already picked) and the picture will say “Runner-Up” below it.

After a couple of seconds the screen moves on to the second group of four pictures, then the third, then the last four.

After they have selected the winner and runner up of all the groups, the winner of group one will show up next to the runner up of group two. The user then picks one and the word “Winner” appears below it. Then after a couple of seconds it goes to Winner 2 against runner up 3 and so on.

Then winner 1 from the second round plays runner up 2 from the second round all the way to the end when you get the final winner.

When the final winner is displayed I want to be able to show what percentage of the time all 16 were picked as winner as well as showing how many people voted for each.

Even if you tell me the sort of comands I would need to use I could try and read up on them.

Thanks

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@NedalsMar 01.2008 — Write in pseudo code (don't worry about language initally)

You are going to need...

an array for your initial images and for the selected winner and runnerup

a swap_image function.

setTimeout() for the delays.

Once that's done, converting to javascript is pretty simple.

The only relatively tricky part will be how you use the setTimeout().

...as well as showing how many people voted for each.[/quote]
That is going to need a serverside script.
×

Success!

Help @JamesArchibald 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.20,
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,
)...