title: jquery: how do I serialize file type input in jquery
body: <p>I want to serialize file name of the file being uploaded in the input type file , but when I serialized the form in jquery I just got the input type text and others not the file - how do I do it? is it something jquery fails to achieve??</p>
  
  <p>this is the html/php:</p>
  
  <pre><code>&lt;form action="&lt;?php echo HTTP_ROOT.INC_LAYOUT;?&gt;ask_add_xml.php" method="post" enctype="multipart/form-data" id="form_qna_ask"&gt;
  
          &lt;div class="item-form"&gt;
              &lt;h2&gt;&lt;a href="#"&gt;&lt;span&gt;ASK&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
              &lt;label id="ask_title_label"&gt;
              &lt;input type="text" name="ask_title" id="ask_title" value="" title="TYPE IN A TITLE"/&gt;
              &lt;/label&gt;
          &lt;/div&gt;
  
          &lt;div class="item-form"&gt;
              &lt;h2&gt;&lt;a href="#"&gt;&lt;span&gt;EMAIL&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
              &lt;label id="ask_email_label"&gt;
              &lt;input type="text" name="ask_email" id="ask_email" value="" title="TYPE IN YOUR EMAIL"/&gt;
              &lt;/label&gt;
          &lt;/div&gt;
  
          &lt;div class="item-form"&gt;
              &lt;label id="ask_content_label"&gt;
                  &lt;textarea name="ask_content" id="content_mce" title="CONTENT"&gt;&lt;/textarea&gt;
              &lt;/label&gt;
          &lt;/div&gt;
  
          &lt;div class="item-form"&gt;
              &lt;div class="left"&gt;
                  &lt;label&gt;
                  &lt;img src="views/www/styles/images/global/button-add-images-q-n-a.gif" alt="add images" style="float:left;"/&gt; 
                  &lt;h2 id="add_images_label"&gt;&lt;a href="#"&gt;&lt;span&gt;Add Images&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;
                  &lt;/label&gt;
              &lt;/div&gt;
  
              &lt;div class="right"&gt;
                  &lt;div class="processing"&gt;&lt;/div&gt;
                  &lt;input type="submit" name="cancel" value="CANCEL"/&gt;
                  &lt;input type="submit" name="submit" value="SUBMIT"/&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
  
          &lt;div class="item-form" style="border:1px solid #bbbbbb; padding:10px 10px 20px 15px; background-color:#ffffff;"&gt;
              &lt;p&gt;Add images: this allows you to attach pictures to your question. Only 2 pictures at 2MB each are allowed to upload.&lt;/p&gt;
              &lt;input type="file" name="image[]"/&gt;
              &lt;input type="file" name="image[]" /&gt;
          &lt;/div&gt;
  
      &lt;/form&gt;
  </code></pre>
  
  <p>this is the jquery,</p>
  
  <pre><code>this.postForm_ask = function(){
  $("#form_qna_ask").submit(function(){
      $('#popup_result').remove();
      var path = $(this).attr('action');
      var processing = $('#q-n-a .processing');
      processing
          .css({
              margin:"0px 0px 0px -80px",
              position:"absolute",
              visibility:"visible"
              });
  
      processing.html('&lt;div&gt;&lt;p&gt;&lt;img src="'+http_root+img_global+'loader-2b.gif"/&gt; loading&lt;/p&gt;&lt;/div&gt;');
      $.post(path, $("#form_qna_ask").serialize(),function(xml){
              alert($("#form_qna_ask").serialize());
              processing
                  .css({
                      visibility:"hidden"
                      });
              processAsk(xml);
          });
      return false;
      });
  }
  </code></pre>
  
  <p>many thanks,
  Lau</p>