/    Sign up×
Community /Pin to ProfileBookmark

Drop down box with number value

I’m making a page for an online store and what I’m trying to do is have a dropdown box for items and have a set value for them and have it added up and displayed at the bottom of the page. How should I do this?

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@graatzJul 01.2005 — you'd want to use a scripting function to do the work for you. Of course, JavaScript is the preferred language, although I personally do much better with VBScript, however your code would only work in IE. In either case, it's a pretty simple task to reference your form's inputs, do the math, and return a total. I'd either read up a bit on scripting or ask your question again in the JavaScript forum.

Now, if you're not sure how to set up your form, you can try tutorial sites such as:

[URL]http://www.w3schools.com/html/html_forms.asp[/URL]
Copy linkTweet thisAlerts:
@beefwellingtonauthorJul 01.2005 — i've got my form done. just need to code the prices and add it up. idk java though :/
Copy linkTweet thisAlerts:
@graatzJul 01.2005 — posted a reply in the JavaScript forum ?
×

Success!

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