title: How to resend data in the event of a timeout jquery ajax
body: <p>I am using ajax to send info from a filled out form to a php file which sends mass emails to selected user categories from the form. The problem is that the list is quite large (5000 users) and the operation times out before the list is completely done.</p>
  
  <p>I have set a timeout limit for the operation but I dont know how to resend the original form data back to the php file so that it can continue processing the list. Below is that Jquery Ajax code im using</p>
  
  <pre><code>$(document).ready(function(){
    $("#subscriberform").submit(function(e) {
      e.preventDefault(); //prevent default form submit
  
      var postData = $(this).serializeArray();
      var formURL = "'.SITE_PATH.'components/admin/subscribers/ajaxprocess.php";
  
      $.ajax({
        url: formURL,
        type: "POST",
        data: postData,
        timeout: 30000,
        dataType: "html",
        beforeSend: function(){
          $("#formdata").html("&lt;p&gt;Sending selected articles to subscribers: &lt;/p&gt;&lt;img src=\"'.DEFAULT_TEMPLATE_PATH.'images/ajaxloader.gif\"&gt;&lt;p&gt;&lt;strong&gt;Please dont close window&lt;/strong&gt;&lt;/p&gt;");
        },
        success: function(data,textStatus){
          $("#formdata").html("&lt;p&gt;Sent Data ["+textStatus+"]: &lt;/p&gt;"+data+"");
        },
        error: function(x,t,m){
          // I want to insert the code here
        }
      });
    });
  });
  </code></pre>
  
  <p>I am not that knowledgeable in jQuery. Can I please get some assistance on this</p>
  
  <p>Thanks in Advance</p>