I've been around looking for javascript that can do Real Time Calculation.
javascript real time calculation, javascript real time calculation textbox.
by some lucky keywords i found this code. this is exactly the code that i want. it really do the real time calculation. and it doesn't need onChange or OnBlur function.
Just try it
Example
this is the javascript code
<script type='text/javascript' >
function startCalc(){
interval = setInterval("calc()",1);
}
function calc(){
one = document.autoSumForm.firstBox.value;
two = document.autoSumForm.secondBox.value;
document.autoSumForm.thirdBox.value = (one * 1) + (two * 1);
}
function stopCalc(){
clearInterval(interval);
}
</script>
this is the html code
<form name="autoSumForm">
<input class="right" type=text name="firstBox" value="" onFocus="startCalc();" onBlur="stopCalc();"><br>
+ <input class="right" type=text name="secondBox" value="" onFocus="startCalc();" onBlur="stopCalc();"><br>
= <input class="right" type=text name="thirdBox">
</form>
thanks to this site javascript.internet.com . i finally found something useful. almost forgot its Created by: Jim Stiles | www.jdstiles.com
Comments
I learned a lot from Besant Technologies in my college days. They are the Best Java Training Institute in Chennai