problem from the javascript workround manual

More
3 years 4 days ago #109268 by iscar
iscar created the topic: problem from the javascript workround manual
the design:when use click answer M of single choice question, jump to a website.
the code:
<script>
$(document).ready(function () {
document.getElementById("answer286325X1X95M").onclick={window.location="http://www.example.com"}
}
);
</script>
the result: no feedback
i have no idea what's the problem but i feel it's a big problem.really need help!

Please Log in to join the conversation.

More
3 years 4 days ago - 3 years 4 days ago #109269 by DenisChenu
DenisChenu replied the topic: problem from the javascript workround manual
Try
$(document).ready(function () {
  $("#answer{GSQ}M").click(function(){
    window.location.href="http://www.example.com"
  });
});

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 4 days ago by DenisChenu.
The following user(s) said Thank You: iscar

Please Log in to join the conversation.

More
3 years 4 days ago #109279 by iscar
iscar replied the topic: problem from the javascript workround manual
you are the best!

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now