J
|
Jane 7/17/2009 |
Hi, <script language=javascript> var x = document.forms.editform.value_FieldName1; var y = document.forms.editform.value_FieldName2; x.onchange=x.onkeyup=y.onchange=y.onkeyup=function() { document.forms.editform.value_FieldName3.value = document.forms.editform.value_FieldName1.value+document.forms.editform.value_Fie ldName2.value; } </script>
|
M
|
Matthew author 7/17/2009 |
See Below. |
M
|
Matthew author 7/17/2009 |
For some reason, it doesn't actually do any math. When I type in a value in the first field, like 32, then 32 in the next, the result is 3232. All it is doing is placing the numbers right next to each other. |
M
|
Matthew author 7/18/2009 |
It's easier just to do the math in the SQL query. I would still like to see if the Javascript would work though. |
J
|
Jane 7/20/2009 |
Hi, x.onchange=x.onkeyup=y.onchange=y.onkeyup=function() { var FieldName1 = document.forms.editform.value_FieldName1.value; var FieldName2 = document.forms.editform.value_FieldName2.value; document.forms.editform.value_FieldName3.value = FieldName1.toFixed()+FieldName2.toFixed(); }
|
C
|
clig 8/4/2009 |
It's easier just to do the math in the SQL query. I would still like to see if the Javascript would work though.
|
D
|
dsk 10/14/2009 |
I struggled with this as well and performed the following modification that seemed to correct the problem. |