Click to See Complete Forum and Search --> : I have a mess! Can someone Help?


lucas
03-21-2003, 08:53 PM
I am trying to ge this to get Total and I am getting a mismatch error. Can someone look at it and help:(

khalidali63
03-21-2003, 09:49 PM
Its better if you post your question in ASP section

Cheers

Khalid

lucas
03-21-2003, 09:51 PM
What is ASP?

khalidali63
03-21-2003, 09:58 PM
Ohkkay...in that case

well repalce all of your code with this piece


<html>

<head>
<title>Product Order Form</title>
<h3 align=center>Estimate the total to the nearest dollar.</h3>
<br>
<br>
<script type= "text/javascript">
function calcTotal (){
var strPrice, strTaxRate, strTax, strTotal, strCost;
strPrice = parseInt(document.frmProd.txtprice.value)
strTaxRate = parseFloat(document.frmProd.txttaxRate.value)
strTax = (strPrice * strTaxRate).toFixed(2);
strTotal = strPrice+strTaxRate
document.frmProd.txtTotal.value = strTotal;
}
</script></head>
<body text="404040" bgcolor="COCOFF">
<form method="post" name="frmProd" action="javascript:void(0)">
<br>


<input type="text" value="10.00" name="txtprice" size="7">
<b> Product Price</b><br>
<br>
<br>
<input type="text" value="0.07" name="txttaxRate" size="7">
<b>Total Tax in Dollars</b><br>
<br>
<br>
<input type="text" value="0" name="txtTotal" size="7">
<b>Your Total Cost of This Product</b><br>
<br>
<br>
<input type="button" value=" Calculate My Total" sub="btnSubmit1" onClick="calcTotal();">
</form>
</body>
</html>


ASP is active server pages scripting language by microsoft for server side coding.

Cheers

Khalid

lucas
03-21-2003, 10:01 PM
I need it to stay in VBSCript