CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Display Calculated Field (Ajax)

Print topic Send  topic

Author Message
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;
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.