I need help to get this form to round out the cents to two decimal places. I'm new at this, I got the basic line and modified them, but can't seem to get past the $0.00 thing
I did try a round() math function but to no avail.
Don
<HTML>
<HEAD>
<TITLE></TITLE>
<META name="description" content="">
<META name="keywords" content="">
<META name="generator" content="www.the-spider-web.com">
<script language="javascript">function doit()
{
var Total_Right = document.form.Total_Right.value
var right_quantity = document.form.right_quantity.value
var Total_Left = document.form.Total_Left.value
var left_quantity = document.form.left_quantity.value
var Total_Bracket = document.form.Total_Bracket.value
var bracket_quantity = document.form.bracket_quantity.value
document.form.Total_Right.value=right_quantity*98.95
document.form.Total_Left.value=left_quantity*98.95
document.form.Total_Bracket.value=bracket_quantity*6.95
document.form.Total.value=right_quantity*98.95+left_quantity*98.95+bracket_quantity*6.95
}
function tax()
{
var Total_Right = document.form.Total_Right.value
var right_quantity = document.form.right_quantity.value
var Total_Left = document.form.Total_Left.value
var left_quantity = document.form.left_quantity.value
var Total_Bracket = document.form.Total_Bracket.value
var bracket_quantity = document.form.bracket_quantity.value
var Total = document.form.Total.value
var wv_tax = document.form.wv_tax.value
document.form.wv_tax.value=right_quantity*98.95*.06+left_quantity*98.95*.06+bracket_quantity*6.95*.0 6
document.form.WV_Total.value=right_quantity*98.95+left_quantity*98.95+bracket_quantity*6.95+right_qu antity*98.95*.06+left_quantity*98.95*.06+bracket_quantity*6.95*.06
}
function clearit()
{
document.form.Total_Right.value=""
document.form.Total_Left.value=""
document.form.Total_Bracket.value=""
}</script>
</HEAD>
<BODY BACKGROUND="HTTP://the-spider-web.com/ " BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080">
<center>
<form action="http://users./mail.pl" method="post" name="form">
<input name="Recipient" type="hidden" value=http://www.webdeveloper.com/forum/archive/index.php/"xxx.net"
<p >Shipping Information
<input type="hidden" name=" Products Shipping Information">
<p >Name<input type="text" name="Name" size="30">
<p> Street 1<input type="text" name="1address" size="15"> Street 2<input type="text" name="2address" size="15">
<p> City<input type="text" name="City" size="18"> State<input type="text" name="State" size="2"> Zip<input type="text" name="Zip" size="10">
<p> Phone Number<input type="text" name="Phone Number" size="12">
<hr>
<p >Card Holder Information:<input type="hidden" name="Card Holder Information">
<p > Name:<input type="text" name="Name" size="30">
<p >VISA:<input type="radio" name="visa"> MasterCard:<input type="radio" name="mastercard"> Personal Check:<input type="radio" name="Check:">
<p >Card Number:<input type="text" name="card number" size="25">
<p >Expiration Date:<input type="text" name="exp" size="10">
<hr>
<p > Items To Order:
<input type="hidden" name="Items To Order">
<p>Right Hand Sight <input type="text" name="right_quantity" value="" size="2"> x $98.95 ea. 1 Totals:$<input type="text" name="Total_Right" value="0.00" size="8">
<P>Left Hand Sight <input type="text" name="left_quantity" value="" size="2"> x $98.95 ea. 2 Totals:$<input type="text" name="Total_Left" value="0.00" size="8">
<p>Slotted Sight Bracket <input type="text" name="bracket_quantity" value="" size="2"> x $ 6.95 ea. 3 Totals:$<input type="text" name="Total_Bracket" value="0.00" size="8">
<P><INPUT TYPE=button NAME=Button VALUE="Total" onclick="doit()">$<input type="text" name="Total" value="0.00" size="8">
<p>WV Tax$<input type="text" name="wv_tax" value="0.00" size="8"> WV Residents add 6% State tax <INPUT TYPE=button NAME=Button VALUE="WV Tax Total" onclick="tax()">$<input " type="text" name="WV_Total" value="0.00" size="8">
<p ><input type="submit" value="Order"> <input type="reset" value="reset form">
</form>
</BODY>
</HTML>
I did try a round() math function but to no avail.
Don
<HTML>
<HEAD>
<TITLE></TITLE>
<META name="description" content="">
<META name="keywords" content="">
<META name="generator" content="www.the-spider-web.com">
<script language="javascript">function doit()
{
var Total_Right = document.form.Total_Right.value
var right_quantity = document.form.right_quantity.value
var Total_Left = document.form.Total_Left.value
var left_quantity = document.form.left_quantity.value
var Total_Bracket = document.form.Total_Bracket.value
var bracket_quantity = document.form.bracket_quantity.value
document.form.Total_Right.value=right_quantity*98.95
document.form.Total_Left.value=left_quantity*98.95
document.form.Total_Bracket.value=bracket_quantity*6.95
document.form.Total.value=right_quantity*98.95+left_quantity*98.95+bracket_quantity*6.95
}
function tax()
{
var Total_Right = document.form.Total_Right.value
var right_quantity = document.form.right_quantity.value
var Total_Left = document.form.Total_Left.value
var left_quantity = document.form.left_quantity.value
var Total_Bracket = document.form.Total_Bracket.value
var bracket_quantity = document.form.bracket_quantity.value
var Total = document.form.Total.value
var wv_tax = document.form.wv_tax.value
document.form.wv_tax.value=right_quantity*98.95*.06+left_quantity*98.95*.06+bracket_quantity*6.95*.0 6
document.form.WV_Total.value=right_quantity*98.95+left_quantity*98.95+bracket_quantity*6.95+right_qu antity*98.95*.06+left_quantity*98.95*.06+bracket_quantity*6.95*.06
}
function clearit()
{
document.form.Total_Right.value=""
document.form.Total_Left.value=""
document.form.Total_Bracket.value=""
}</script>
</HEAD>
<BODY BACKGROUND="HTTP://the-spider-web.com/ " BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080">
<center>
<form action="http://users./mail.pl" method="post" name="form">
<input name="Recipient" type="hidden" value=http://www.webdeveloper.com/forum/archive/index.php/"xxx.net"
<p >Shipping Information
<input type="hidden" name=" Products Shipping Information">
<p >Name<input type="text" name="Name" size="30">
<p> Street 1<input type="text" name="1address" size="15"> Street 2<input type="text" name="2address" size="15">
<p> City<input type="text" name="City" size="18"> State<input type="text" name="State" size="2"> Zip<input type="text" name="Zip" size="10">
<p> Phone Number<input type="text" name="Phone Number" size="12">
<hr>
<p >Card Holder Information:<input type="hidden" name="Card Holder Information">
<p > Name:<input type="text" name="Name" size="30">
<p >VISA:<input type="radio" name="visa"> MasterCard:<input type="radio" name="mastercard"> Personal Check:<input type="radio" name="Check:">
<p >Card Number:<input type="text" name="card number" size="25">
<p >Expiration Date:<input type="text" name="exp" size="10">
<hr>
<p > Items To Order:
<input type="hidden" name="Items To Order">
<p>Right Hand Sight <input type="text" name="right_quantity" value="" size="2"> x $98.95 ea. 1 Totals:$<input type="text" name="Total_Right" value="0.00" size="8">
<P>Left Hand Sight <input type="text" name="left_quantity" value="" size="2"> x $98.95 ea. 2 Totals:$<input type="text" name="Total_Left" value="0.00" size="8">
<p>Slotted Sight Bracket <input type="text" name="bracket_quantity" value="" size="2"> x $ 6.95 ea. 3 Totals:$<input type="text" name="Total_Bracket" value="0.00" size="8">
<P><INPUT TYPE=button NAME=Button VALUE="Total" onclick="doit()">$<input type="text" name="Total" value="0.00" size="8">
<p>WV Tax$<input type="text" name="wv_tax" value="0.00" size="8"> WV Residents add 6% State tax <INPUT TYPE=button NAME=Button VALUE="WV Tax Total" onclick="tax()">$<input " type="text" name="WV_Total" value="0.00" size="8">
<p ><input type="submit" value="Order"> <input type="reset" value="reset form">
</form>
</BODY>
</HTML>