Have an idea?

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

Error in JavaScript

Hi,

I have a combobox question (Q5A1_r1_c1) and this question has skip logic i.e., based on the previous question response this question will be shown. The below code is working fine if this question is shown however I am facing problem to move to next screen (active screen is freezed) if this question is not shown.

var Q5AValue=[%Q5A1_r1_c1%];


if(Q5AValue==1 && SSI_GetValue("Q8A2_r1_c1")==1)
{
       strErrorMessage= "You can't Select AT&T DSL as current and also previous provider"
}


I think somethink wrong with the below code if it is blank

var Q5AValue=[%Q5A1_r1_c1%];


Kindly let me know how to handle this.
asked Oct 29, 2013 by Abdul Bronze (1,560 points)

1 Answer

+2 votes
 
Best answer
Try with

var Q5AValue =  '[%Q5A1_r1_c1%]' ;


also add a ';' at the end of the strErrorMessage
answered Oct 29, 2013 by phronexia Bronze (3,270 points)
selected Oct 29, 2013 by Abdul
Thank you so much :)
...