It worked before i added in the other 13 lines, but now it doesn't want to calculate.

<html>

<head>

</head>

<body bgcolor="#000000" text="#FFFF00">

<script language="JavaScript"><!--
function cent(amount) {
// returns the amount in the .99 format
    return (amount == Math.floor(amount)) ? amount + '.00' : (  (amount*10 == Math.floor(amount*10)) ? amount + '0' : amount);
}

function update(form) {
    var subtotal = 
         (form.QTY_LINE_ONE.value - 0) * (form.PRICE_LINE_ONE.value - 0)
      +  (form.QTY_LINE_TWO.value - 0) * (form.PRICE_LINE_TWO.value - 0)
      +  (form.QTY_LINE_THREE.value - 0) * (form.PRICE_LINE_THREE.value - 0)
      +  (form.QTY_LINE_FOUR.value - 0) * (form.PRICE_LINE_FOUR.value - 0)
      +  (form.QTY_LINE_FIVE.value - 0) * (form.PRICE_LINE_FIVE.value - 0)
      +  (form.QTY_LINE_SIX.value - 0) * (form.PRICE_LINE_SIX.value - 0)  
      +  (form.QTY_LINE_SEVEN.value - 0) * (form.PRICE_LINE_SEVEN.value - 0)
      +  (form.QTY_LINE_EIGHT.value - 0) * (form.PRICE_LINE_EIGHT.value - 0)
      +  (form.QTY_LINE_NINE.value - 0) * (form.PRICE_LINE_NICE.value - 0)
      +  (form.QTY_LINE_TEN.value - 0) * (form.PRICE_LINE_TEN.value - 0)
      +  (form.QTY_LINE_ELEVEN.value - 0) * (form.PRICE_LINE_ELEVEN.value - 0)
      +  (form.QTY_LINE_TWELVE.value - 0) * (form.PRICE_LINE_TWELVE.value - 0)
      +  (form.QTY_LINE_THIRTEEN.value - 0) * (form.PRICE_LINE_THIRTEEN.value - 0)  
      +  (form.QTY_LINE_FOURTEEN.value - 0) * (form.PRICE_LINE_FOURTEEN.value - 0)
      +  (form.QTY_LINE_FIFTEEN.value - 0) * (form.PRICE_LINE_FIFTEEN.value - 0)
      +  (form.QTY_LINE_SIXTEEN.value - 0) * (form.PRICE_LINE_SIXTEEN.value - 0)
      +  (form.QTY_LINE_SEVENTEEN.value - 0) * (form.PRICE_LINE_SEVENTEEN.value - 0)
      +  (form.QTY_LINE_EIGHTEEN.value - 0) * (form.PRICE_LINE_EIGHTEEN.value - 0)
      +  (form.QTY_LINE_NINETEEN.value - 0) * (form.PRICE_LINE_NINETEEN.value - 0)
      +  (form.QTY_LINE_TWENTY.value - 0) * (form.PRICE_LINE_TWENTY.value - 0);

    subtotal = Math.floor(subtotal * 100)/100;
    form.subtotal.value = '$' + cent(subtotal);

    var tax = subtotal / 100 * (form.rate.value - 0);
    tax = Math.floor(tax * 100)/100;
    form.tax.value = '$' + cent(tax);

  shipping = (form.ship.value - 0)

    total = subtotal + tax + shipping;
    total = Math.floor(total * 100)/100;
    form.total.value = '$' + cent(total);
}

<form action="mailto:bavonhelpers@yahoo.com" method="post">
<input type="hidden" name="subject" value="*** AVON REPRESENATIVE ORDER***"><input type="hidden" name="rate" value="6" size="8">


</form>


<table width="188" cellpadding="0" cellspacing="0" border="0" height="169" bgcolor="#000000">
    <tr>
        <th align="center" height="14" width="302" bgcolor="#FFFF00"><b><font size="2" color="#000000" face="Arial">ONLINE
          ORDER FORM</font></b></th>
    </tr>
    </tr>
    <tr>
        <td align="right" height="1" width="308"><font face="Arial" size="2" color="blue">&nbsp;District#
          :&nbsp; <input type="text" name="District #" maxlength="70" size="14"></font></td>
    </tr>
    <tr>
    </tr>
    <tr>
        <td align="right" height="1" width="308"><font face="Arial" size="2" color="blue">&nbsp;Account#
          :&nbsp; <input type="text" name="Account#" maxlength="70" size="14"></font></td>
    </tr>
    <tr>
        <td align="right" height="1" width="308"><font face="Arial" size="2" color="blue">Name :&nbsp; <input type="text" name="Name" maxlength="70" size="14"></font></td>
    </tr>
    <tr>
        <td align="right" height="1" width="308"><font face="Arial" size="2" color="blue">&nbsp;Address
          :&nbsp; <input type="text" name="Address" maxlength="70" size="14"></font></td>
    </tr>
    <tr>
        <td align="right" height="1" width="308"><font face="Arial" size="2" color="blue">Phone
          # :&nbsp; <input type="text" name="Phone" maxlength="70" size="14"></font></td>
    </tr>
    <tr>
        <td align="right" height="1" width="308"><font face="Arial" size="2" color="blue">E-Mail
          :&nbsp; <input type="text" name="email" maxlength="70" size="14"></font></td>
    </tr>
    <tr>
        <td align="right" height="1" width="308"><font face="Arial" size="2" color="blue"> Total # of Customers on Order
          :&nbsp; <input type="text" name="Number of Customers on Order" maxlength="70" size="14"></font></td>
    </tr>
    <tr>
        <td align="right" height="1" width="308"><font face="Arial"><u><font size="2" color="blue">DO
          NOT&nbsp; USE </font><font size="4" color="#00FF00"><i><b>$</b></i></font><font size="3" color="blue">'s</font><font size="2" color="blue">
          IN PRICES!</font></u></font></td>
    </tr>
</table>

<table border="1" width="192" height="170">
  <tr>
    <td width="80" height="28" align="center">QTY</td>
    <td width="80" height="28" align="center">ITEM #</td>
    <td width="74" height="28" align="center">Price</td>
  </tr>
  <tr>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="QTY_LINE_ONE" size="4"></font></td>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="ITEM_LINE_ONE" size="7"></font></td>
    <td width="74" height="28" align="center"><font size="1"><input type="text" name="PRICE_LINE_ONE" size="6"></font></td>
  </tr>
  <input type="hidden" name="___" value="____" size="0">
  <tr>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="QTY_LINE_TWO" size="4"></font></td>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="ITEM_LINE_TWO" size="7"></font></td>
    <td width="74" height="28" align="center"><font size="1"><input type="text" name="PRICE_LINE_TWO" size="6"></font></td>
   </tr>
  <input type="hidden" name="___" value="____" size="0">
  <tr>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="QTY_LINE_THREE" size="4"></font></td>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="ITEM_LINE_THREE" size="7"></font></td>
    <td width="74" height="28" align="center"><font size="1"><input type="text" name="PRICE_LINE_THREE" size="6"></font></td>
  </tr>
  <input type="hidden" name="___" value="____" size="0">
  <tr>
    <td width="80" height="29" align="center"><font size="1"><input type="text" name="QTY_LINE_FOUR" size="4"></font></td>
    <td width="80" height="29" align="center"><font size="1"><input type="text" name="ITEM_LINE_FOUR" size="7"></font></td>
    <td width="74" height="29" align="center"><font size="1"><input type="text" name="PRICE_LINE_FOUR" size="6"></font></td>
  </tr>
  <input type="hidden" name="___" value="____" size="0">
  <tr>
    <td width="80" height="29" align="center"><font size="1"><input type="text" name="QTY_LINE_FIVE" size="4"></font></td>
    <td width="80" height="29" align="center"><font size="1"><input type="text" name="ITEM_LINE_FIVE" size="7"></font></td>
    <td width="74" height="29" align="center"><font size="1"><input type="text" name="PRICE_LINE_FIVE" size="6"></font></td>
 </tr>
  <input type="hidden" name="___" value="____" size="0">
  <tr>
    <td width="80" height="29" align="center"><font size="1"><input type="text" name="QTY_LINE_SIX" size="4"></font></td>
    <td width="80" height="29" align="center"><font size="1"><input type="text" name="ITEM_LINE_SIX" size="7"></font></td>
    <td width="74" height="29" align="center"><font size="1"><input type="text" name="PRICE_LINE_SIX" size="6"></font></td>
  </tr>
  <input type="hidden" name="___" value="____" size="0">
  <tr>
    <td width="80" height="29" align="center"><font size="1"><input type="text" name="QTY_LINE_SEVEN" size="4"></font></td>
    <td width="80" height="29" align="center"><font size="1"><input type="text" name="ITEM_LINE_SEVEN" size="7"></font></td>
    <td width="74" height="29" align="center"><font size="1"><input type="text" name="PRICE_LINE_SEVEN" size="6"></font></td>
  </tr>
  <input type="hidden" name="___" value="____" size="0">
  <tr>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="QTY_LINE_EIGHT" size="4"></font></td>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="ITEM_LINE_EIGHT" size="7"></font></td>
    <td width="74" height="28" align="center"><font size="1"><input type="text" name="PRICE_LINE_EIGHT" size="6"></font></td>
  </tr>
  <input type="hidden" name="___" value="____" size="0">
  <tr>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="QTY_LINE_NINE" size="4"></font></td>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="ITEM_LINE_NINE" size="7"></font></td>
    <td width="74" height="28" align="center"><font size="1"><input type="text" name="PRICE_LINE_NINE" size="6"></font></td>
   </tr>
  <input type="hidden" name="___" value="____" size="0">
  <tr>
  <tr>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="QTY_LINE_TEN" size="4"></font></td>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="ITEM_LINE_TEN" size="7"></font></td>
    <td width="74" height="28" align="center"><font size="1"><input type="text" name="PRICE_LINE_TEN" size="6"></font></td>
  </tr>
  <input type="hidden" name="___" value="____" size="0">
  <tr>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="QTY_LINE_ELEVEN" size="4"></font></td>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="ITEM_LINE_ELEVEN" size="7"></font></td>
    <td width="74" height="28" align="center"><font size="1"><input type="text" name="PRICE_LINE_ELEVEN" size="6"></font></td>
   </tr>
  <input type="hidden" name="___" value="____" size="0">
  <tr>
  <tr>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="QTY_LINE_TWELVE" size="4"></font></td>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="ITEM_LINE_TWELVE" size="7"></font></td>
    <td width="74" height="28" align="center"><font size="1"><input type="text" name="PRICE_LINE_TWELVE" size="6"></font></td>
  </tr>
  <input type="hidden" name="___" value="____" size="0">
  <tr>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="QTY_LINE_THIRTEEN" size="4"></font></td>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="ITEM_LINE_THIRTEEN" size="7"></font></td>
    <td width="74" height="28" align="center"><font size="1"><input type="text" name="PRICE_LINE_THIRTEEN" size="6"></font></td>
   </tr>
  <input type="hidden" name="___" value="____" size="0">
  <tr>
  <tr>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="QTY_LINE_FOURTEEN" size="4"></font></td>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="ITEM_LINE_FOURTEEN" size="7"></font></td>
    <td width="74" height="28" align="center"><font size="1"><input type="text" name="PRICE_LINE_FOURTEEN" size="6"></font></td>
  </tr>
  <input type="hidden" name="___" value="____" size="0">
  <tr>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="QTY_LINE_FIFTEEN" size="4"></font></td>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="ITEM_LINE_FIFTEEN" size="7"></font></td>
    <td width="74" height="28" align="center"><font size="1"><input type="text" name="PRICE_LINE_FIFTEEN" size="6"></font></td>
   </tr>
  <input type="hidden" name="___" value="____" size="0">
  <tr>
  <tr>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="QTY_LINE_SIXTEEN" size="4"></font></td>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="ITEM_LINE_SIXTEEN" size="7"></font></td>
    <td width="74" height="28" align="center"><font size="1"><input type="text" name="PRICE_LINE_SIXTEEN" size="6"></font></td>
  </tr>
  <input type="hidden" name="___" value="____" size="0">
  <tr>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="QTY_LINE_SEVENTEEN" size="4"></font></td>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="ITEM_LINE_SEVENTEEN" size="7"></font></td>
    <td width="74" height="28" align="center"><font size="1"><input type="text" name="PRICE_LINE_SEVENTEEN" size="6"></font></td>
   </tr>
  <input type="hidden" name="___" value="____" size="0">
  <tr>
  <tr>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="QTY_LINE_EIGHTEEN" size="4"></font></td>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="ITEM_LINE_EIGHTEEN" size="7"></font></td>
    <td width="74" height="28" align="center"><font size="1"><input type="text" name="PRICE_LINE_EIGHTEEN" size="6"></font></td>
  </tr>
  <input type="hidden" name="___" value="____" size="0">
  <tr>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="QTY_LINE_NINETEEN" size="4"></font></td>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="ITEM_LINE_NINETEEN" size="7"></font></td>
    <td width="74" height="28" align="center"><font size="1"><input type="text" name="PRICE_LINE_NINETEEN" size="6"></font></td>
   </tr>
  <input type="hidden" name="___" value="____" size="0">
  <tr>
  <tr>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="QTY_LINE_TWENTY" size="4"></font></td>
    <td width="80" height="28" align="center"><font size="1"><input type="text" name="ITEM_LINE_TWENTY" size="7"></font></td>
    <td width="74" height="28" align="center"><font size="1"><input type="text" name="PRICE_LINE_TWENTY" size="6"></font></td>
  </tr>
  <input type="hidden" name="___" value="____" size="0">
  <tr>
 </table>
  <table border="0" width="193" height="109">
    <tr>
      <td width="518" height="20" bgcolor="#FFFF00">
        <p style="word-spacing: 0; margin: 0" align="center"><font face="Arial" size="2" color="blue"><u><i>Shipping
        </i><b> </i></u></font></p>
        <p style="word-spacing: 0; margin: 0" align="center"><font face="Arial" size="2" color="blue"><b>$3.00
        For All Orders!</b></font></p>
        <p style="word-spacing: 0; margin: 0" align="center">
        <b><i><font face="Arial" size="2" color="#000000"><input type="text" name="ship" size="8" value="3.00"></font></i></b>
        </p>
     </td>
    </tr>
  </table>
<table width="93">
<tr><td width="208">
    <table border="1" width="186">
      <tr>
        <td width="62">Subtotal </td>
        <td width="108" align="center"><input type="text" name="subtotal"size="8">
        </td>
      </tr>
      <tr>
        <td width="62">6% Tax</td>
        <td width="108" align="center"><input type="text" name="tax"size="8">
        </td>
      </tr>
      <tr>
        <td width="93" valign="middle" align="center">
          <p style="margin: 0">
    <input type="button" onClick="update(this.form)" value="Calculate"></td>
        <td width="83" valign="middle" align="center">
          <input type="text" name="total"size="8"></td>
      </tr>
      <tr>
        <td width="176" colspan="2" valign="middle" align="center">
          <CENTER>
<input type="submit" value="Submit Order">
          </td>
      </tr>
    </table>
 </td></tr>
</table><CENTER>
</form>


<center>
<script language="JavaScript">
<!-- Begin
decodeString();
// End -->
</script>
</center>
</form>

Please help me, If you can fix this, email me the new to [email snipped] with subject as Email Form.

Thanks
Branden

Edited 3 Years Ago by pyTony: Fixed formating

Dude, put your code inside the code tags. And also, you can check in here for the modified code, no one is going to e-mail it to you. That's just rude of you to ask that.

Edited 4 Years Ago by happygeek: fixed formatting

This article has been dead for over six months. Start a new discussion instead.