Jan van Dalen
|
| Posted: 04/19/2010, 2:22 PM |
|
Hi Everyone,
Ok, this one is a puzzle to me. I have 3 fields (float) and I'll like to
display a 4th one with the calculated value of the other 3 fields (addition).
The fields should update every time one of the 3 fields is updated.
I tried RemoteCustomeCode (Ajax) but I cannot make it refresh after every
change on those fields.
Any assistance is welcome ... BTW, I'm using ASP but don't think it matters.
Thank you.
|
|
|
 |
datadoit
|
| Posted: 04/19/2010, 2:37 PM |
|
Just use simple javascript.
For every field client On Change: UpdateTotal();
<script language="javascript">
UpdateTotal() {
Total =
document.forms["YourForm"].Field1.value+document.forms["YourForm"].Field2.value+document.forms["YourForm"].Field3.value;
document.forms["YourForm"].YourTotal.value = Total;
}
</script>
|
|
|
 |
Jan van Dalen
|
| Posted: 04/19/2010, 4:32 PM |
|
Hello datadoit,
Well, I guess I can do it that way but I was trying to figure out if any
of Yes ajax solution will work.
Thanks for guiding me to a more simpler solution :)
> Total =
>
> document.forms["YourForm"].Field1.value+document.forms["YourForm"].Fie
> ld2.value+document.forms["YourForm"].Field3.value;
>
> document.forms["YourForm"].YourTotal.value = Total;
>
|
|
|
 |
|