title: TypeError: Cannot read property 'value' of null
body: <p>radio button for answering quiz and my radio button is</p>
  
  <pre><code>&lt;input id="ans_ans1" name="ans" type="radio" value="ans1"&gt;
  </code></pre>
  
  <p>my next ajax request is</p>
  
  <pre><code>&lt;a href="#" onclick="Element.show('loader'); jQuery.ajax({data:'answer='+$('ans').value+'&amp;amp;passed_question=1&amp;amp;'+'&amp;amp;exam_group_id=1&amp;amp;' + '&amp;amp;authenticity_token=' + encodeURIComponent('GGKdjhC39b1Fi5fe52Cq0VcPwpi6laphZblC/5ZOl8o='), dataType:'script', success:function(request){Element.hide('loader')}, type:'post', url:'/answers/next'}); return false;"&gt;Next&lt;/a&gt;
  </code></pre>
  
  <p>in my console  </p>
  
  <blockquote>
    <p>$('ans').value gives TypeError: Cannot read property 'value' of null</p>
  </blockquote>
  
  <p>any one help me to get the value of radio button in ajax request</p>