
1. Re: Logic problem to divide from total
try67 May 14, 2015 3:13 PM (in response to SSGNG)I'm not sure about the logic behind it, but this line is wrong:
if ( TOTAL = 100 ) event.value = "0";
The comparison operator is "==", not "=". So it should be:
if ( TOTAL == 100 ) event.value = "0";
Also, you don't really need that line because if the total is 100 the calculation will be (100100)/4, which is zero anyway...

2. Re: Logic problem to divide from total
gkaiseril May 14, 2015 3:17 PM (in response to SSGNG)JavaScript syntax has different operators for assignment of a value and comparison operators..
The "=" is a simple assignment operator. There are additional for operators adding, subtracting, multiplying, dividing, and remainder assignment by another value as well as bit assignment operators.
The "==" is the simple value comparison operator. There are additional comparisons for Boolean comparisons.

3. Re: Logic problem to divide from total
SSGNG May 14, 2015 3:35 PM (in response to try67)I am learning this whole process as I work along =) Trying to read up as I go from one thing to the next. I've negated that redundant line, thanks for the help.

4. Re: Logic problem to divide from total
SSGNG May 14, 2015 4:37 PM (in response to SSGNG)As a follow up question, I have redone the script to display the proper value, but now it wont appear?
I've even redone the script to do a simple addition problem, but it wont display. Its set to the last field calculation. Not sure why it is doing this.

5. Re: Logic problem to divide from total
try67 May 15, 2015 1:45 AM (in response to SSGNG)Open the JS Console (Ctrl+J) and check if there are any error messages.