Welcome to the LimeSurvey Community Forum

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

Javascript document.write when using Ranking

  • matthias83
  • matthias83's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 2 days ago #128176 by matthias83
Hello,

I would like to use the nice Ranking function so that users have to sort the given items. However, if I use javascript in the field "answer option" (to generate the text for the question), the correspondingtext appears twice ( once again the bottom of the page).

I entered: <script type="text/javascript" charset="utf-8">document.write("Test");</script>

Can anybody help me?

Regards,
Matthias
The topic has been locked.
  • matthias83
  • matthias83's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 day ago #128187 by matthias83
Replied by matthias83 on topic Javascript document.write when using Ranking
i can answer my question myself. it is more suitable to use innerHTML.

var id = "htmlblock-28-A2";
document.getElementById(id).innerHTML="Hello";

you need to know the element id though.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose