We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,708 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Change image depending on value of Multiple numerical input with limesurvey

I'm trying to use limesurvey but cannot get the slider as i would like it. Here is a link to the surveyquestion: http://adam.synology.me/limesurvey/index.php/survey/index/sid/164171/newtest/Y/lang/sv

I want the images to change according to the value of the sliders. With a regular html form i had this to take care of it:

<script type='text/javascript'>//<![CDATA[ 
    $(window).load(function(){
    $("#slider").change(function() {
sVal = $(this).val();

if(sVal <= 49) {
    $('#theImage').attr('src','http://xxx.com/img/img1.png');
}

if(sVal > 49 && sVal <= 100) {
    $('#theImage').attr('src','http://xxx.com/img/img2.png');
}

    });
 });//]]>  
</script>

 <script type='text/javascript'>//<![CDATA[ 
 $(window).load(function(){
$("#slider").change(function() {
sVal = $(this).val();

if(sVal <= 49) {
    $('#theImage2').attr('src','http://xxx.com/img/img2.png');
}

if(sVal >= 50 && sVal <= 100) {
    $('#theImage2').attr('src','http://xxx.com/img/img3.png');
}

});
});//]]>  

 </script>

But I cannot for the life of me figure out what to change to get it working on limesurvey!

Any thoughts would be greatly appreciated!

2
Contributors
2
Replies
47 Minutes
Discussion Span
8 Months Ago
Last Updated
3
Views
adishardis
Junior Poster in Training
91 posts since Jun 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Wrong forum. This one is for java.

NormR1
Posting Sage
Team Colleague
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16

Ups :) is there a way to move it or should i just start a new thread?

adishardis
Junior Poster in Training
91 posts since Jun 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0592 seconds using 2.7MB