Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Custom javascript not working

We have a grid question with 3 rows and 1 column and we are asking the user to input a number (0 to infinite) against those 3 rows. However, we want to avoid the case of all 3 values being 0 so had put the below javascript


if (SSI_GETVALUE ("Q2_r1_c1") < 1 && SSI_GETVALUE("Q2_r2_c1") < 1  && SSI_GETVALUE("Q2_r3_c1") < 1)
{ 
strErrorMessage = "At least one value should be more than 0";
}


The script doesn't throw any error but nothing happens on clicking next. While inspecting the javascript, it shows Uncaught ReferenceError: SSI_GETVALUE is not defined.

Thanks in advance
asked Feb 20 by Tarun (145 points)

1 Answer

+3 votes
JavaScript is case-sensitive.  You need to use "SSI_GetValue."
answered Feb 20 by Zachary Platinum Sawtooth Software, Inc. (117,475 points)
My bad for missing out on this. Thanks a lot Zach.
...