title: AJAX Radio Buttons with jQuery
body: <p>I need help to get submission of an RSVP with radio buttons like this:</p>
  
  <pre><code>Attending: &lt;input type="radio" /&gt;
  Maybe Attending: &lt;input type="radio" /&gt;
  Not Attending: &lt;input type="radio" /&gt;
  </code></pre>
  
  <p>Whenever someone RSVP the event, it should ratio the input to the selected (so just one radio button can only be selected), so when one option is selected, it should do an AJAX request with the <code>$.ajax</code> function.</p>
  
  <p>I did this:</p>
  
  <pre><code>Attending: &lt;input type="radio" onclick="rsvpEvent(3, 1);" /&gt;
  Maybe Attending: &lt;input type="radio" onclick="rsvpEvent(2, 1);" /&gt;
  Not Attending: &lt;input type="radio" onclick="rsvpEvent(1, 1);" /&gt;
  </code></pre>
  
  <p>With jQuery:</p>
  
  <pre><code>function rsvpEvent(rsvp, id)
  {   
      $.ajax({
         type: "GET",
         url: "http://localhost:8888/update/test.php",
         data: "rsvp=" + rsvp + "id=" + id,
         success: function()
         {
           alert('rsvp: ' + rsvp + ' id: ' + id);
         },
         error: function()
         {
           alert('rsvp: ' + rsvp + ' id: ' + id);
         }
       });
  }
  </code></pre>
  
  <p>That doesn't work at all... what is the problem?</p>