6 Replies
Ned Whiteley

Hi Mary,

The attached example asks for four values to be input and then calculates the sum of those values when the Calculate button is selected. The values are initially set to zero and the Calculate button will only work if all four values are greater than zero. If any one or more of the values are still zero, a message appears and no calculation takes place.

Hope this helps. :)

Mary Teresa Goeman

Thanks Michael! that would work, but I wouldn't want to reset them though.  When they click calculate the value NaN appears where the calculation should be.  Is there java to say if NaN displays, change the NaN error text for example to "All fields required"?

 

 

 

Mary Teresa Goeman

Thank you for your help everyone!!  I got it to work. 

I made a layer and put white boxes over the NaN errors that are created when a learner doesn't input all fields.  Then I create a a show layer trigger when the variable = NaN, and a hide layer trigger when the variable does not = NaN