Secyrb
12-18-2005, 08:40 PM
Here is my code i cant seem to get the reset button to work??
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Price Quote</title>
</head>
<script>
function doCalculation()
{
var g = parseFloat(document.getElementById('originalGunPrice').value);
var s = parseFloat(document.getElementById('shipping').value);
var x = (g * 1.1 * 1.0725) + s + 25;
x=Math.round(x*100)/100
document.getElementById('calculatedPrice').value = x;
return false;
}
</script>
</head>
<body>
<p> </p>
<p> </p>
<p align="left">
Gun Price
<input id="originalGunPrice" type="text" value="0">
</p>
<p>
10% Handling
<input name="h" type="text" id="10%" value="10%" readonly="true">
</p>
<p>
Tax
<input name="t" type="text" value=".0725" readonly="true">
</p>
<p>
Shipping
<input id="shipping" type="text" value="0">
</p>
<p>
DROS Fees
<input name="f" type="text" value="+$25" readonly="true">
</p>
<p> </p>
<p> </p>
<p>
<input name="Calcuate" type="submit" onClick="doCalculation();">
<input name="reset" type="reset">
</p>
<p>
Price Quote:
<input id="calculatedPrice" type="text">
</p>
<p> </p>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Price Quote</title>
</head>
<script>
function doCalculation()
{
var g = parseFloat(document.getElementById('originalGunPrice').value);
var s = parseFloat(document.getElementById('shipping').value);
var x = (g * 1.1 * 1.0725) + s + 25;
x=Math.round(x*100)/100
document.getElementById('calculatedPrice').value = x;
return false;
}
</script>
</head>
<body>
<p> </p>
<p> </p>
<p align="left">
Gun Price
<input id="originalGunPrice" type="text" value="0">
</p>
<p>
10% Handling
<input name="h" type="text" id="10%" value="10%" readonly="true">
</p>
<p>
Tax
<input name="t" type="text" value=".0725" readonly="true">
</p>
<p>
Shipping
<input id="shipping" type="text" value="0">
</p>
<p>
DROS Fees
<input name="f" type="text" value="+$25" readonly="true">
</p>
<p> </p>
<p> </p>
<p>
<input name="Calcuate" type="submit" onClick="doCalculation();">
<input name="reset" type="reset">
</p>
<p>
Price Quote:
<input id="calculatedPrice" type="text">
</p>
<p> </p>
</body>
</html>