Check out the LimeSurvey source code on GitHub!

Empty javascript test

More
3 years 2 months ago #101348 by gregfr
Hello Community

I'm creating my first survey with LS, and I'm using the feature where a question B appears only when a question A is given a specific answer.

When I browse to the question B, Chrome gives an error:
Uncaught SyntaxError: Unexpected token ) 
Uncaught ReferenceError: ExprMgr_process_relevance_and_tailoring is not defined 

The first one is:
  if(){
    $('#vmsg_32_regex_validation').removeClass('error').addClass('good');
  }
  else {
    $('#vmsg_32_regex_validation').removeClass('good').addClass('error');
    isValidOther32=false;
  }

The second one is:
 ExprMgr_process_relevance_and_tailoring(evt_type,name,type);


looks like a bug but maybe I'm doing something wrong?

Please Log in to join the conversation.

More
3 years 2 months ago #101349 by gregfr
I saw somewhere it could be a cache problem, not in my case I tried with a "clean" browser and also on a different server...

Please Log in to join the conversation.

More
3 years 2 months ago #101351 by DenisChenu
Hi,

You surely have a "EM" expression error : look at the expression manager test file.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

More
3 years 2 months ago #101375 by gregfr
Thanks for your answer :)

Well I don't know what an "EM" expression is... I have lots to learn!

Meanwhile I deleted the question and added it back manually and the error disappeared.

However I had a few other javascripts error because of empty variable declaration (like "var whatever = ;"). Is there a way for me to track these back to the location of the problem?

Thanks again!

greg

Please Log in to join the conversation.

More
3 years 2 months ago - 3 years 2 months ago #101379 by DenisChenu
Hi,

For Expression Manager validation, look at the survey menu / survey settings / end of this menu.
It's the better way to track down Logic Error.

Denis
PS: need some doc update here ....

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
Last Edit: 3 years 2 months ago by DenisChenu.

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form