Empty javascript test

More
3 years 9 months ago #101348 by gregfr
gregfr created the topic: Empty javascript test
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 9 months ago #101349 by gregfr
gregfr replied the topic: Empty javascript test
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 9 months ago #101351 by DenisChenu
DenisChenu replied the topic: Empty javascript test
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).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 9 months ago #101375 by gregfr
gregfr replied the topic: Empty javascript test
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 9 months ago - 3 years 9 months ago #101379 by DenisChenu
DenisChenu replied the topic: Empty javascript test
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).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 3 years 9 months ago by DenisChenu.

Please Log in to join the conversation.

Did you already participate in our customer survey?

Don't miss your chance for great prices.

Please click here to participate:

Start now

Start now!

Just create your account and start using Limesurvey today.

Register now