Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: javascript

javascript 5 years 7 months ago #59795

  • mattias01
  • mattias01's Avatar
  • Offline
  • Senior Lime
  • Posts: 79
  • Karma: 1

and tried to make a validation if a field is greater than another throw an alert using javascript but it throws an error Can you help me this is my function

validation function ()
if ("{INSERTANS: 98382X261X4872}" <= "{INSERTANS: 98382X261X4873} ")
alert ("The total number of boxes must be greater than or equal to the number of active cases");
document.limesurvey.move.value = 'MovePrev';
document.limesurvey.submit ();
document.limesurvey.move.value = 'MoveLast';
document.limesurvey.submit ();

setTimeout ("validation ()", 250);

I hope you can help me greetings

The administrator has disabled public write access.

javascript 5 years 7 months ago #59803

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9555
  • Thank you received: 1373
  • Karma: 389

You can use {INSERTANS: 98382X261X4872} in a javascript only on a group (for a group by group survey) after the question.

For the same page, you have to use $('#questionXXX input').val(); jquery function.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time (Need support ?).
A bug not reported is a bug not corrected. | 2.61lts version improved | Need plugins for LimeSurvey ?
The administrator has disabled public write access.
Time to create page: 0.188 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form