title: AJAX post function not working properly after first call to the function
body: <p>I'm totally new to jquery and AJAX, After trying hard for 5-6 hours and searching the solution I'm asking for the help.</p>
  
  <pre><code>&lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      $(function() {
          $(".submit").live('click',(function() {
  
              var data = $("this").serialize();
              var arr = $("input[name='productinfo[]']:checked").map(function() {
                  return this.value;
              }).get();
              if(arr=='')
              {
                  $('.success').hide();
                  $('.error').show();
              }
              else
              {
                  $.ajax({
                      data: $.post('install_product.php', {productvars: arr}),
                      type: "POST",
                      success: function(){
                          $(".productinfo").attr('checked', false);
                          $('.success').show();
                          $('.error').hide();
                      }
                  });
              }
              return false;
          }));
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>and HTML+PHP code is,</p>
  
  <pre><code>$json = file_get_contents(feed address);
  $products = json_decode($json);
  foreach(products as product){
      // define various $productvars as a string
      &lt;input type="checkbox" class="productvars" name="productinfo[]" value="&lt;?php echo $productvars; ?&gt;" /&gt;
  }
  &lt;input type="submit" class="submit" value="Install Product" /&gt;
  
  &lt;span class="error" style="display:none"&gt;&lt;font color="red"&gt;No product selected.&lt;/font&gt;&lt;/span&gt;
  &lt;span class="success" style="display:none"&gt;&lt;font color="green"&gt;product successfully added to database.&lt;/font&gt;&lt;/span&gt;
  </code></pre>
  
  <p>As I'm pulling the product information from feed, I don't want to refresh the page, that's why I'm using AJAX post method. Using above code "install_product.php" page is handling the string properly and doing its job properly.</p>
  
  <p>The problem I'm facing is, when first time I check the check box and install the product it works absolutely fine, but after first post "Sometimes it work and sometimes it won't work". As new list is pulled from feed every first post is perfect after that I need to click install button again and again to do so.</p>
  
  <p>I tested the code on different browsers, but same problem. What may be the problem?
  (I'm testing the code on live host not localhost)</p>