View Single Post
Old 04-27-2007, 12:33 AM   #4 (permalink)
zkiller
Super Noob
 
zkiller's Avatar
 
Join Date: Aug 2004
Location: position:relative
Posts: 1,562
Send a message via AIM to zkiller Send a message via Yahoo to zkiller
Default

something like that...

Code:
<html>
<body>


<script language="JavaScript">

function calculate()
{
var A1 = document.Qty_form.quanity.value;
var A2 = document.Qty_form.price.value;
var A3 = (A1*A2);
document.Qty_form.total.value = A3;
}
</script>

<html>
<body>

<form name="Qty_form" onChange=calculate();>
<input type="text" name="quanity">
X
<input type="text" name="price">
=
<input type="text" name="total" >
</form>

<style type="text/css">

</body>
</html>
seems to be working to me. you will need to finish the action of changing the respective value by either clicking out of the field or hitting enter.
__________________
Stefan, the Post Master

Track Devil - May the boost be with you!
zkiller is offline   Reply With Quote