Quantcast
Channel: Topics in Category: Can I do this with LimeSurvey? - LimeSurvey forums
Viewing all articles
Browse latest Browse all 17529

Help! Javascript syntax for definitions - by: rodriguezm1

$
0
0
I have a multi-text question, Q1. It has a subquestion, sq1. Q1 is hidden.

I want to use java to insert an answer to Q1_sq1.

What is the syntax?

I've tried
 
document.getElementById('{Q1_sq1}').value = 'new text';
$('#answer{Q1_sq1}').val() = 'new text';
$('#answer{Q1_sq1}').text() = 'new text';
$('#answer{Q1_sq1}').val('new text');
 

None of this works. I would really appreciate your help in telling me how to do something that should be so fundamentally simple, which is define a variable. I don't understand why this doesn't work in LimeSurvey easily.

Viewing all articles
Browse latest Browse all 17529

Trending Articles