title: issue with javascript for loop not executing every time
body: <p>I'm using this JavaScript code for alert count in an array of pages.</p>
  
  <p>urls is an array of page names, and count is the count value.</p>
  
  <p>I want to alert the count value in each pages of the array urls.</p>
  
  <p>But the for loop is not executing all time. I don't know what happens... Any body please help me to find out the mistake..</p>
  
  <p>Am using <code>echo $_POST['suggest'];</code> in the array of pages. But i want to use JavaScript code for receiving the value of suggest and alert it. How to receive the value using JavaScript?</p>
  
  <pre><code>&lt;script&gt;
          $(document).ready(function () {
              var count = document.getElementById('display_visitor_number').innerHTML; //count
              var urls = document.getElementById('display_visitor_urls').innerHTML; //array of page names
              var myarr = urls.split(",");
  
              for (var i=1;i&lt;myarr.length;i++)
              { 
                  $.post(myarr[i],{suggest:count}, function(data) {
                      alert(data);
                  });
              }
  
  
          });
      &lt;/script&gt;
  </code></pre>