4 Replies Latest reply on Apr 1, 2010 3:02 PM by TLC-IT

    Cost Calculator

    rmorgan Level 1

      Hello,

       

      I am creating a cost calculator for a hobby of mine and was wondering what would be some good ways of handling it. It does not have to be real fancy and I would like it to be contained to one page. Ideally I want to fill in the blanks, click the calculate button and then it will display the results. Here is my base that I am working with. I know how to do the actual calculating routines, I just need some input on some good ways to go about it. TIA.

       

      <cfform name="form1" id="form1" method="post" action="">
      <u>Calculator</u><br />
      <br />
      <table width="64%" border="0" cellpadding="0">
        <tr>
          <td width="31%"><div align="center"><strong>Component</strong></div></td>
          <td width="31%"><div align="center"><strong>Quantity</strong></div></td>
          <td width="38%"><div align="center"><strong>Cost</strong></div></td>
        </tr>
        <tr>
          <td>Powder(lbs)</td>
          <td>
            <cfinput type="text" name="PowderQty" id="PowderQty">
          </td>
          <td>$
          <cfinput type="text" name="PowderCost" id="PowderCost"></td>
        </tr>
        <tr>
          <td>Powder Charge(grains)</td>
          <td><cfinput type="text" name="PowderCharge" id="PowderCharge"></td>
          <td> </td>
        </tr>
        <tr>
          <td>Primer</td>
          <td><cfinput type="text" name="PrimerQty" id="PrimerQty"></td>
          <td>$
          <cfinput type="text" name="PrimerCost" id="PrimerCost"></td>
        </tr>
        <tr>
          <td>Case</td>
          <td><cfinput type="text" name="CaseQty" id="CaseQty"></td>
          <td>$
          <cfinput type="text" name="CaseCost" id="CaseCost"></td>
        </tr>
        <tr>
          <td>Bullet</td>
          <td><cfinput type="text" name="BulletQty" id="BulletQty"></td>
          <td>$
          <cfinput type="text" name="BulletCost" id="BulletCost"></td>
        </tr>
      </table>
      <p>
        <cfinput type="button" name="Calculate" value="Calculate" id="Calculate" >
      </p>
      Cost/Round: Show calculations when calc button is pressed<br />
      Cost/20:Show calculations when calc button is pressed<br />
      Cost/50:Show calculations when calc button is pressed<br />
      Cost/100:Show calculations when calc button is pressed<br />
      Cost/500:Show calculations when calc button is pressed<br />
      Cost/1000:Show calculations when calc button is pressed<br />

       

      </cfform>