title: Send value of selected radio button to ajax function
body: <pre><code>&lt;select onChange="getclass(this.value); name="Course_ID" &gt;
  </code></pre>
  
  <p>I have an ajax function 'getclass' which gets called whenever i change the value of my dropdown list.
  I want to pass the value of a radio button as well to the ajax function whenever this function gets called.</p>
  
  <pre><code>&lt;input type="radio" name="type" value="c" checked="checked"&gt; Class&lt;br&gt;
  </code></pre>
  
  <p>Here is the ajax function</p>
  
  <pre><code>function getclass(val1) {
      $.ajax({
          type: "POST",
          url: "get_class.php",
          data:'id='+val1,
          success: function(data){
          $("#class-list").html(data);
          }
      });
  }
  </code></pre>