Hi there!
I'm using limesurvey for some time, but quite new to ,,hack" it with javascript.
I'm trying to create a table, which will be updated, if the multiple choice question below is checked.
E.g.:
The table before the click
Multiple choice question:
Is question 1...
... option 1? (checked)
... option 2? (not checked)
... option 3? (checked)
Then, the table should look like something like this:
I was trying to achieve this with javascript (for question 1 option 1 to do the X):
But I'm not sure, if this is the right way. As i said, i'm quite new to js, so maybe it's all wrong.
I'm open to any suggestions and grateful for any help/solutions provided!
I've attached the test survey ( ). I'm using 2.06+ Build 151018.
Have a nice day:
Thomas
I'm using limesurvey for some time, but quite new to ,,hack" it with javascript.
I'm trying to create a table, which will be updated, if the multiple choice question below is checked.
E.g.:
The table before the click
| | | option 1 | | option 2 | | option 3 |
| question 1 | | | | | | |
Multiple choice question:
Is question 1...
... option 1? (checked)
... option 2? (not checked)
... option 3? (checked)
Then, the table should look like something like this:
| | | option 1 | | option 2 | | option 3 |
| question 1 | | x | | | | x |
I was trying to achieve this with javascript (for question 1 option 1 to do the X):
<script type="text/javascript">
$(document).ready(function(){
var y=document.getElementById("q1o1");
$('input.checkbox').click(function(e){
if($('#answer482695X397X122631').is(':checked')) {
y.innerhtml("x");
}
});
</script>
But I'm not sure, if this is the right way. As i said, i'm quite new to js, so maybe it's all wrong.
I'm open to any suggestions and grateful for any help/solutions provided!
I've attached the test survey ( ). I'm using 2.06+ Build 151018.
Have a nice day:
Thomas