View Single Post
Old 04-25-2007, 02:49 PM   #1 (permalink)
jmad
Bronze Member
 
Join Date: Feb 2007
Location: minnestota
Posts: 81
Default i am wondering y doesnt show answer right away.

the script is set up for an onchange event but in order for it to work u need to leave the input field meaning its acting like it is an onblur event. y wont it change on the entery of new input? ne thoughts........???

<script language="JavaScript">

function calculate()
{
A1 = document.Qty_form.a1.value
A2 = document.Qty_form.a2.value
A3 = (A1*A2)
document.Qty_form.a3.value = A3
}
</script>

<html>
<body>

<form name="Qty_form">
<input type="text" name="a1">
X
<input type="text" name="a2" onChange=calculate();>
=
<input type="text" name="a3" >
</form>

<style type="text/css">
__________________
some times i sits n i thinks ............ some times i jus sits.

Last edited by jmad; 04-25-2007 at 11:01 PM.
jmad is offline   Reply With Quote