First let me say sorry for creating yet another one of these topics.
I've read through the forum and found alot of examples. But I've been editing/ changing my code for 4 hours now and not getting what I'm looking for.
Simple layout: I need to do a simple calculation and then write that value of the calculation to the value of a question. Now I've figured out the calculation part. Now I just need to write the value to another place:
Current Code
<script>
$(document).ready(function() {
var x=0;
if ({INSERTANS:49825X1X1SQ001} = "A1"){
x=x+1;
}
if ({INSERTANS:49825X1X1SQ002} = "A1"){
x=x+1;
}
document.getElementById("answer49825X1X7").value = 'x'
});
</script>
So the value of X needs to be written to the answer value of Question 49825X1X7.
49825X1X1SQ001 & 49825X1X1SQ002 & 49825X1X7 is found on a prev page.
Another question. If I choose the value of a question (in the advance properties section) so that the question is 'always hidden'. Can I still write a value to it using the above method?