Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

LS3.x and javascript

  • vkuzmin
  • vkuzmin's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 9 months ago #185591 by vkuzmin
Replied by vkuzmin on topic LS3.x and javascript
in that example input field was changed by js but self.NAOK wasnt changed. Sometimes it is necessary for Limesurvey and LEM* to know that the input field has been changed.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 9 months ago #185593 by DenisChenu
Replied by DenisChenu on topic LS3.x and javascript
Replace
Code:
document.getElementById("answer"+sgq).value=Math.random();
by
Code:
$("#answer"+sgq).val(Math.random()).trigger("keyup");

Jquery is here to help you

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • vkuzmin
  • vkuzmin's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 9 months ago #185594 by vkuzmin
Replied by vkuzmin on topic LS3.x and javascript
Code:
$("#answer"+sgq).val(Math.random()).trigger("keyup");
Thank you, it works!
As i said early in LS2 I've used document.getElementById("answerxxxxx").onkeyup(); but in LS3 it wont work

All issues are solved now.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose