jfiers
Programmer
- Feb 9, 2008
- 1
I am trying to do something that should be simple but I am struggling. I am trying to load text boxes with dollars amounts from a database with a total box. If the user changes the numbers in the box I want to retotal. Here is the JavaScript
<script language="JavaScript" type="text/JavaScript"><!--
$(document).ready (function startCalc(){
interval = setInterval("calc()",1);}
function calc(){
one = document.bcraviewaction.firstBox.value;
two = document.bcraviewaction.secondBox.value;
document.bcraviewaction.thirdBox.value = (one * 1) + (two * 1);})
$(document).ready (function stopCalc(){
clearInterval(interval);})
</script>
Here is the text box:
<input type="text" class="right" width="30" maxlength="12" name="firstbox" onFocus="startCalc();" onBlur="stopCalc();" value="dbValue" />
I keep receiving the following error:
Line: 267
Char: 1
Error: Object Expected
Code: 0
URL: myurl.cfm
I would appreciate any advice you can give.
Thanks in advance
<script language="JavaScript" type="text/JavaScript"><!--
$(document).ready (function startCalc(){
interval = setInterval("calc()",1);}
function calc(){
one = document.bcraviewaction.firstBox.value;
two = document.bcraviewaction.secondBox.value;
document.bcraviewaction.thirdBox.value = (one * 1) + (two * 1);})
$(document).ready (function stopCalc(){
clearInterval(interval);})
</script>
Here is the text box:
<input type="text" class="right" width="30" maxlength="12" name="firstbox" onFocus="startCalc();" onBlur="stopCalc();" value="dbValue" />
I keep receiving the following error:
Line: 267
Char: 1
Error: Object Expected
Code: 0
URL: myurl.cfm
I would appreciate any advice you can give.
Thanks in advance