/    Sign up×
Community /Pin to ProfileBookmark

Hey ppl.

I need some help please.
I have got several bottles on a page. I need the user to choose a bottle then click a link (1st bottle) to store it in that position, then click the second bottle, then click a link(2nd bottle) to store it in the variable .

The objective is to get the user to choose 4 bottles, fill out some details and submit a form..

at the moment i am having trouble with thecreating of variables.any body have an idea of what the code would look like?

Thanks a million

D-H

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@JonaJun 19.2003 — [font=arial][color=maroon]We might have a very good idea of what the code would look like--if we better understood what you wanted. :p

Could you post a link or some code? Could you explain a little better please--I'm not sure what you mean by "bottles." ?[/color]
[/font]

[b]Jona[/b]
Copy linkTweet thisAlerts:
@dhpotterauthorJun 19.2003 — Hey Jona.

Thank you for your help yesterday! You really did a great job!! ?

the link is http://www.a-newu.co.uk/followup.html

The initial idea is to click on a bottle, then click on the [1st bottle link] to store that bottle there, then proceed, and click on the second bottle and click on the [2nd bottle] link to confirm it, and so on till have 4 bottles. then display the choices so that one could send them in form ..
Copy linkTweet thisAlerts:
@JonaJun 19.2003 — [font=arial][color=maroon]OK, you don't need to have two links. You can just do it in one onclick:[/color][/font]

[font=courier new]

<script type="text/javascript">

var bottles = new Array(4);

</script>

<img src="bottle_01.jpg" onClick="bottles[0] = this.src;">

[/font]

[font=arial][color=maroon]And for the second set of bottles, change the above zero (0) to one (1), and so on.[/color][/font]

[b]Jona[/b]
Copy linkTweet thisAlerts:
@dhpotterauthorJun 20.2003 — ok, i was thinking it would be better to do it in 2 clicks, as they might change their mind. In other words they can click any bottle they want and only when they click [1st bottle] does it commit that bottle to the variable.
Copy linkTweet thisAlerts:
@JonaJun 20.2003 — [font=arial][color=maroon]You could use form boxes, so they can not only change their mind but also see what bottles they have chosen.[/color][/font]

[b]Jona[/b]
×

Success!

Help @dhpotter 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.4,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...