adding variables
August 18, 2008 12:00 AM
This is a real newbie question, but I can't find the answer. I am trying to add the values of four variables. The values come from user input, for example:Variable01 = 2Variable02 = 4Variable03 = 3Variable02 = 5I then want to show the result of the four added together, which in this case would be 14. I am trying to do this by creating an action group with two actions:The first action modifies a fifth variable "Result1". The action properties are:Action: Modify variableTarget: Result1Value: javascript(VarVariable01.value)+(VarVariable02.value)+(VarVa riable03.value)+(VarVariable04.value) Modification type: Set variable contentsThe second action just shows the variable "Result1".What's happening is that Result1 shows "2435" instead of "14"I don't know much about javascript either, so may have the wrong script. Can anyone tell me what I am doing wrong, or tell me a better way to add four variables together?Thanks in advance!
Discussions have been disabled for this post