title: progress bar with $.ajax and php
body: <p>I'm trying to make a progress bar which works with $.ajax(jquery) and php for a file uploader but I dont know how to assemble it. I know there is a progress bar working with jQuery UI; how ever, it just change while receiving a value. And that's the point. How can I get a dinamic value for the byte uploded?</p>
  
  <p>By the way, this is my code:</p>
  
  <hr>
  
  <p>fx_file.js</p>
  
  <pre><code>/*This function gets Data from the form and send it to server*/
  function fiEnviarDatos2(){
      $("form#data").click(function(){
              /*Some DOM'S animations*/
      });
  
      $("form#data").submit(function(){
  
      var formData = new FormData($(this)[0]);
  
      $.ajax({
          url: "PHP/Core/Archivos/upload.php",
                      type: 'POST',
                      data: formData,
                      async: false,
                      success: function (data) {
  
                          /*After actions**/
  
                      },
                      progress:function(data){
                          alert(data);
                      },
                      cache: false,
                      contentType: false,
                      processData: false
      });
  return false;
  });`
  </code></pre>
  
  <hr>
  
  <p>upload.php</p>
  
  <hr>
  
  <pre><code>&lt;?php include ("Class_upload.php");
  
   /*Variables*/
  $i=0;
  $archivos=0;
  
  /*Contains numbers of file sent*/
  $archivos=((count($_FILES,1)-6)/5);
  
  /*Contains the user's session name*/
  session_start();
  $sUsuario=$_SESSION['usuario'];
  
  /*Use the information of each file to create a new class Upload*/
  for($i=0;$i&lt;$archivos;$i++){
  
      /*FileSize*/
      $tamaArchivo = $_FILES['formUploader']['size'][$i];
  
      /*Filename*/
      $nombArchivo = strtolower($_FILES['formUploader']['name'][$i]);
  
      /*Filetemp*/
      $tmpArchivo = $_FILES['formUploader']['tmp_name'][$i];
  
      /*It creates class Upload*/
      $archivo_subir=new Upload($nombArchivo,$tamaArchivo,$tmpArchivo,$sUsuario);
  
      /*It validates each file and returns a status*/
      $estatus=$archivo_subir-&gt;enviarData();
  
      /*Returns if file's been uploaded or not*/
      $resultFile=$archivo_subir-&gt;resultFile($estatus);
      echo "&lt;br&gt;";
      if($estatus&gt;0){
          echo "&lt;div class='resultDeny'&gt;".$resultFile."&lt;/div&gt;";
      }else{
          if($resultFile=="ServerError"){
              echo "&lt;div class='resultServer'&gt;".$resultFile."&lt;/div&gt;";
          }else{
              echo "&lt;div class='resultSuccess'&gt;".$resultFile."&lt;/div&gt;";
          }
  
      }
  
  }
  </code></pre>
  
  <hr>
  
  <p>I hope I can found some help from you, guys. I know you all are expert. I'm new working with jquery and php; however , i've seen "their power together" and i want to learn more about them.</p>
  
  <p>Thanks for all.</p>
  
  <p>PDT: Sorry for my english, it's not my mother language. JQ &amp;PHP will be.</p>