Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Profit calculator

SpaceshipSpaceship
SpaceshipSpaceship
NamecheapNamecheap
Watch

tanicos

Established Member
Impact
0
hello

can anyone point me in the right direction? searched google but no luck
what i need:

a profit calculator to:
Ex: people can calculate their profit for selling stuff.
Number of people: 20
Number of dvds: 10
Number of books: 10

Total profit 12000$

now here is the math: when they add 10 dvds this will be multiplied with 32$
when they add 10 books it will be multiplied with 28$
so 32*10=320$+280$(10*28)=600$ * 20people=12000$

Can someone tell me?thanks
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
U just need to make an excel sheet with proper formulaes thats it.. No need to seperate tool to do this stuff..... :)
 
0
Close
hello

i need it on a website page:)
 
0
Close
Code:
<html>
<head>

<script type='text/javascript'>
function calc() {

  var cost_dvd = 32;
  var cost_book = 28;

  document.getElementById('total').innerHTML = Math.floor(document.getElementById('people').value) * (Math.floor(document.getElementById('dvds').value) * cost_dvd + Math.floor(document.getElementById('books').value) * cost_book);
}
</script>

</html>

<body>

People: <input type='text' size='3' id='people' onkeyup='calc();' value='0' /><br />
DVDs: <input type='text' size='3' id='dvds' onkeyup='calc();' value='0' /><br />
Books: <input type='text' size='3' id='books' onkeyup='calc();' value='0' /><br /><br />
Total: $<span id='total'>0</span>


</body>
</html>


Bruce
 
0
Close
Bruce_KD said:
Code:
<html>
<head>

<script type='text/javascript'>
function calc() {


Bruce
i can't thank you enough...is there a way to add a button which says calculate instead of automatic result? thanks a lot
 
0
Close
take out the onkeyup="calc();" from the 3 <input>s and add an <button onclick="calc();> and you SHOULD get the same result, except on button click.
 
0
Close
nasaboy007 said:
take out the onkeyup="calc();" from the 3 <input>s and add an <button onclick="calc();> and you SHOULD get the same result, except on button click.
thank you very much too :wave:
 
0
Close
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Search: choose where to search from the All tab
Open the search at the top of any page. On the All tab, the list next to the search box lets you choose where to search: everything, all...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back