title: File downloading in AJAX with download counter
body: <p>I am creating simple file download counter in AJAX. But in my code, counter is working in PHP codemeans it is increasing its value by one per download but file is not downloading. Below is my code<br></p>
  
  <p><strong>index.php</strong></p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(function() {
  
  $(".download_button").click(function() {         
      var test = $("#content").val();
      var dataString = 'content='+ test;  
  
      $.ajax({
          type: "POST",
          url: "download_counter.php",
          data: dataString,
          cache: false,
          success: function(html){      
                 $("#display").after(html);             
                 }
      });
     return false;
   });           
  });
  &lt;/script&gt;
  &lt;a href="file_path/file.pdf" class="download_button" id="v" download&gt;
      Download 
  &lt;/a&gt;
  </code></pre>
  
  <p><strong>download_counter.php</strong></p>
  
  <pre><code>&lt;?php      
         //Code for counter Increment 
        //Query to Update database
  ?&gt;
  </code></pre>
  
  <p>I don't have any problem with database or download counter in PHP code. I have problem with file downloading. Counter is increasing by one but file is not downloading.</p>