/    Sign up×
Community /Pin to ProfileBookmark

Assign call to the function process sales

What I’m doing is calculating sales commission based on sales amount and commission rate within a function calcCommission.
I have a form in the html that the user can input their name and sales amount in and they click send and it calculates commission.
The function processSales reads input from the text boxes, converts to a number calls the function calcCommission and displays relevant data.
How do I assign call to the function processSales to the onclick event of the button send variable?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@rootMar 27.2018 — Well it helps to know what you have done so far, what are you stuck on and please not that you may not get an answer as it is clearly a homework / assignment type question where you need to show you learned something.

So you know the variables,

you have an input box per person and also a box associated with them for their sales and you would need one for their commission rate as not everyone gets the same commission

and you need

a couple of functions,

one to process the web form you create

and one to do the calculation of the commission.

So start with your HTML page first, then worry about the script after.
×

Success!

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