Link to home
Start Free TrialLog in
Avatar of Xtry
Xtry

asked on

JavaScript Calculatopr Markup

hello there,
i am trying to add some javascript code in my html but i just cant get it done.
i have 3 products that cost $2.00 dollars each one, and if they want to buy 500 will divide it
by 20%, 8000 divide it by %30 and if they want 12000 for %40, and show the prince thats
all i need to do

here is my html code

<html>
<head>
<title>Calculator Markup</title>
</head>
<body>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#000000" width="100%" id="AutoNumber1">
  <tr>
    <td><font face="Verdana" style="font-size: 9pt; font-weight: 700">Product</font></td>
    <td><font face="Verdana" style="font-size: 9pt; font-weight: 700">Quantity</font></td>
    <td><span style="font-weight: 700">
    <font face="Verdana" style="font-size: 9pt">Price per Product $2.00</font></span></td>
  </tr>
  <tr>
    <td>
    <select class="dropdown" style="WIDTH: 99; BACKGROUND-COLOR: #99ccff; height:99" size="1" name="X_Product">
    <option value>Select</option>
    <option value="DF6870">DF6870</option>
    <option value="EF6890">EF6890</option>
    <option value="GF6860">GF6860</option>
    </select></td>
    <td>
    <select class="dropdown" style="WIDTH: 99; BACKGROUND-COLOR: #99ccff; height:99" size="1" name="X_Product">
    <option value>Select</option>
    <option value="500">500</option>
    <option value="8000">8000</option>
    <option value="12000">12000</option>
    </select></td>
    <td>
    <input maxLength="5" name="X_Price" size="20"></td>
  </tr>
  </table>
</body>
</html>
ASKER CERTIFIED SOLUTION
Avatar of cLFlaVA
cLFlaVA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cLFlaVA
cLFlaVA

Note:  if the price will always be $2, and there will always only be those three options for quantity, there really is no calculation needed.  This can be done much simpler, but I assumed you'd wanted the calculation for an actual JavaScript solution.
Avatar of Xtry

ASKER

awsome man, thanks a lot