I've got the following code, which writes radiobuttons through javascript to HTML
document.write('<input type="radio" name="AnswerA" />' + res.rows[jsonCounter][1]);
Say, I want to access this AnswerA field and find out if it's been selected, I can try :
if(document.getElementById('AnswerA').checked) {
}
But this doesn't seem to work - can anyone see what I'm doing wrong?