Ok, my first question is a numeric input. It's ID is 85348X27X184. My second question is a list (radio). The id of the second question is 85348X27X185 and the codes for each answer are 0, 1, 2, 3 and 4.
I inserted this code in the next section of my survey; but It doesn´t change the answer of my second question. Why?
<script>
$(document).ready(function() {
if ({INSERTANS:85348X27X184} > 0)
{
if ({INSERTANS:85348X27X184} < 16)
{
$('#answer85348X27X185').val(0);
}
else if ({INSERTANS:85348X27X184} < 30)
{
$('#answer85348X27X185').val(1);
}
else if ({INSERTANS:85348X27X184} < 45)
{
$('#answer85348X27X185').val(2);
}
else if ({INSERTANS:85348X27X184} < 65)
{
$('#answer85348X27X185').val(3);
}
else if ({INSERTANS:85348X27X184} >= 65)
{
$('#answer85348X27X185').val(4);
}
}
});
</script>