I'm assuming you're using text inputs.
Your selector is wrong and you have a syntax error.
Given:
- survey ID: 864437
- group ID: 180
- question ID: 1001
- y-axis code: SQ001
- x-axis code: A2
The selector should be:
Code:
#answer864437X180X1001SQ001_A2
So, the script should be:
Code:
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#answer864437X180X1001SQ001_A2').val('988');
});
</script>
Or, even better, test to make sure the question has not been previously answered:
Code:
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
if($('#answer864437X180X1001SQ001_A2').val() == "") {
$('#answer864437X180X1001SQ001_A2').val('988');
}
});
</script>
.