I have a small radio button list in a form, and I am trying to access the elements in it. My alert (shown at the bottom) keeps coming back undefined. I also tried accessing the form instead of the list by using getElementById('question0') but that returned me a confusing result of '7'. Can somebody tell me what I am doing wrong?


Code:
<form class="quest" id="question0" style="visibility: hidden">
<fieldset>
<legend>Question0</legend>
<ul class="inside" id="quest0">
<li><input type="radio" value="A"> A</li>
<li><input type="radio" value="B"> B</li>
<li><input type="radio" value="C"> C</li>
<li><input type="radio" value="D"> D</li>
</ul>
</fieldset>
<p id="submit"><input type="button" onclick="cycleQuest()" value="Submit"><input type="reset" style="float: right"></p>
</form>


function cycleQuest() 
{
var textField = document.getElementById('quest0');
alert(textField.length);
}