PDA

View Full Version : Addition in Form



oboboy
10-23-2004, 06:55 PM
I want to use some addition and or multiplication in a Form. For example, I am selling widgets for 3 dollars and if some one wants 5 of them it should MULTIPLY '*' to 15 dollars. Is there some way I can put this in a FORM or on an HTML page. Can I use Java Script or better to use ASP. (VB) ..thanks

cr3ative
10-23-2004, 07:04 PM
I just made this, is this what you mean?

(insert in BODY area)


<p>Item Price <input type="text" name="price" size="20"></p>
<p>Qty <input type="text" name="quant" size="20"></p>
<p>Total <input type="text" name="text1" size="20"></p>

<script>

function calc(){

text1.value = price.value * quant.value

setTimeout("calc()",100);

}

setTimeout("calc()",100);


</script>


cr3ative