title: Get selected radio button value in javascript
body: <p>I have dynamically created radio buttons and have assigned them ids. Now when i try,</p>
  
  <pre><code>function updateAO(id2) {
      var status = $('input[name=id2]:checked').val();
      alert(status);
  }
  </code></pre>
  
  <p>It prints undefined. Can anyone please tell how to get this value.
  Thanks in advance!!</p>