title: jquery get radio button value
body: <p>all i want is to use the .get function to retrieve the selected/checked radio button value, i think i got the code right, but the sequence is kinda wrong</p>
  
  <pre><code>$.get('burgerorder_check.php', function(data) {
                  inputVal = $('input[type=radio][name=timeslot]:checked').val();
              });
  </code></pre>
  
  <p>then after i get the inputVal, i want to reload a particular div with that specific input</p>
  
  <pre><code>    setInterval(getData,1000);
      getData();
      function getData(){
      if( inputField ) {
      $("#timeslot").load('burgerorder_check.php?dateselect='+inputField+'&amp;inputselect=a'+inputVal);
      };
  </code></pre>
  
  <p>any help? So far the inputVal value is null :(</p>
  
  <p>Full block of code :</p>
  
  <pre><code>$(document).ready(function(){
          var inputField;
          var inputVal;
  
  
          $("#dateslot").change(function(){
          inputField = $('#dateslot').val();
          });
  
          $.get('burgerorder_check.php', function(data) {
              inputVal = $('input[type=radio][name=timeslot]:checked').val();
          });
  
          setInterval(getData,1000);
          getData();
          function getData(){
          if( inputField ) {
          $("#timeslot").load('burgerorder_check.php?dateselect='+inputField+'&amp;inputselect=a'+inputVal);
          };
          };
  
  
  });
  </code></pre>