title: change target of form after submit
body: <p>I've been working so much on this and making zero progress I'm about to freak out. Please help!</p>
  
  <p>Below is the code. </p>
  
  <p>I want the TARGET attribute of the form to change from <code>target="frame1"</code> to <code>target="frame2"</code> then <code>target="frame3"</code> and so on, unlimited AFTER a form is submitted. The form is submitting these to iframe so the page is not refreshing after every submit. </p>
  
  <p>Can anyone help?</p>
  
  <pre><code>&lt;div id="container"&gt;
  &lt;div id="scan"&gt;
    &lt;form method="post" id="auditRepairForm" name="auditRepairForm" action="https://example.com.com" target="changeTarget()"&gt;
      &lt;input name="scanID" id="scanID" value="12345678" onFocus="this.value=''" /&gt;
      &lt;input name="fromLaunchScreen" id="fromLaunchScreen" type="hidden"/&gt;
      &lt;input type="submit" id="SubmitForEdit" style="display:none;"/&gt;
    &lt;/form&gt;
  &lt;/div&gt;
  
  &lt;div class="outerdiv"&gt;
  &lt;iframe name="frame1" class="inneriframe"&gt;&lt;/iframe&gt;
  &lt;/div&gt;
  
  &lt;div class="outerdiv"&gt;
  &lt;iframe name="frame2" class="inneriframe"&gt;&lt;/iframe&gt;
  &lt;/div&gt;
  &lt;div class="outerdiv"&gt;
  &lt;iframe name="frame3" class="inneriframe"&gt;&lt;/iframe&gt;
  &lt;/div&gt;
  &lt;div class="outerdiv"&gt;
  &lt;iframe name="frame4" class="inneriframe"&gt;&lt;/iframe&gt;
  &lt;/div&gt;
  &lt;div class="outerdiv"&gt;
  &lt;iframe name="frame5" class="inneriframe"&gt;&lt;/iframe&gt;
  &lt;/div&gt;
  &lt;div class="outerdiv"&gt;
  &lt;iframe name="frame6" class="inneriframe"&gt;&lt;/iframe&gt;
  &lt;/div&gt;
  &lt;div class="outerdiv"&gt;
  &lt;iframe name="frame7" class="inneriframe"&gt;&lt;/iframe&gt;
  &lt;/div&gt;
  &lt;div class="outerdiv"&gt;
  &lt;iframe name="frame8" class="inneriframe"&gt;&lt;/iframe&gt;
  &lt;/div&gt;
  &lt;div class="outerdiv"&gt;
  &lt;iframe name="frame9" class="inneriframe"&gt;&lt;/iframe&gt;
  &lt;/div&gt;
  &lt;div class="outerdiv"&gt;
  &lt;iframe name="frame10" class="inneriframe"&gt;&lt;/iframe&gt;
  &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>