title: POST a form with Jquery AJAX When input is a File
body: <p>I have several areas where I use AJAX to submit text fields.</p>
  
  <pre><code> var name = $("input#name").val(); 
  
     $.ajax({  
        type: "POST",  
        url: "bin/process.php",  
        data: "&amp;name=" + name,  
        success: function() {  
         //handle response here
       }  
      }); 
  </code></pre>
  
  <p>However, I can't figure out how to do this if the input type is a file? Doing</p>
  
  <p><code>var name = $("input#file").val();</code>      doesn't seem to work..</p>