title: Is it possible to submit form in a loop?
body: <p>I've got an iframe <code>bar</code> and I want to put the result of my form submit in there. In a loop. Many times.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>function foo() {
      for (var i = 0; i &lt; 10; i++) {
          console.log(i);
          submitForm(i);
      }
  }
  
  function submitForm(page) {
      var form = document.createElement("form");
  
      form.method = "GET";
      form.action = "http://isup.me";
      form.target = "bar";
      form.id = "form" + page;
  
      var id = document.createElement("input"); 
      id.value = page;
      id.name = "id";
      form.appendChild(id);   
  
      document.body.appendChild(form);
      form.submit();
  }
  </code></pre>
  
  <p>In the network tab I can only see last <code>GET</code> request with parameter <code>9</code> is performed.</p>
  
  <p>PS. I cannot use <code>XMLHttpRequest</code> because of the same origin policy.</p>