Skip to main content
Inspiring
September 11, 2008
Answered

How can I calculate the sum of the text fields?

  • September 11, 2008
  • 1 reply
  • 551 views
I'm trying to use a Flash form that has 40 text fields where the user will enter numeric values. I want to add one field that will show the total of all those values as the user enters them in. I have tried the following, but as soon as I add Val(Trim(...)) around the current amount to make it numeric, it doesn't update as I type anymore. If I take that out, I get an error that it can't be converted to a numeric value. Any suggestions?

Thanks,
    This topic has been closed for replies.
    Correct answer natg504
    Nevermind.... I used this script & it is working

    1 reply

    Inspiring
    September 11, 2008
    If you want to do your calculations as the data is being entered, you'll have to write some actionscript to do it on the client. cfcode runs on the server.
    natg504Author
    Inspiring
    September 11, 2008
    Could you be a little more specific? Where do I put the actionscript or how would I call it? Do you have an example I could go off of?